newbiemodder Posted June 3, 2011 Share Posted June 3, 2011 I want to make a dialog that consists only of bubbles for a npc character. It consists of 3 different statements that pop up each time you click on the character...like what happens with certain random soldiers or commoners. I found this tidbit by Stoffe the great. If you mean speaking with "floating bubbles" over their heads instead of cutscene/dialog mode there are two ways of doing this that I am aware of. You can lay out the entire "conversation" in a script using delayed BarkString() function calls. The disadvantage of doing this is that the script can get quite large if it's a long conversation, and you have to manually handle everything in the script that dialog files usually do for you (delays between barks etc). The largest disadvantage is that BarkString() won't take string constants, thus your text must be added to the dialog.tlk file. Alternatively you can use normal DLG files for this. A dialog branch with only one entry will be "barked" with a speech bubble instead of going into dialog mode. Thus you can add all the conversation lines as entries under the root node (instead of building a dialog tree as usual) and then have a conditional script on each entry to check what "stage" the conversation is in to determine which entry should be used. Each entry would also have an Action script that increments the Stage (a LocalNumber would work to keep track of the stage) and re-starts the conversation to make the next entry show. How would I script the section in yellow? The conditional and the action. Thanks for any help Link to comment Share on other sites More sharing options...
TimBob12 Posted June 3, 2011 Share Posted June 3, 2011 You would have to use Global Numbers. The first dialog node could have a conditional that checks for a certain number than e.g. int StartingConditional() { int i = GetGlobalNumber(dlg_check); if (i == '1') { return true; } } That dialog node would then set the global number one higher void main() { SetGlobalNumber(dlg_check, 2); } This process would then be repeated with each number. Sorry if I didn't go into enough depth. A week away with 21 other teenagers really takes it out of you If you have any problems just ask Link to comment Share on other sites More sharing options...
newbiemodder Posted June 3, 2011 Author Share Posted June 3, 2011 Thanks TB...I didn't use your script but it put me on the right path...I decided to use local numbers rather than global If anyone interested I found this thread to be useful http://www.lucasforums.com/showthread.php?t=178525&highlight=setlocalnumber+script Link to comment Share on other sites More sharing options...
Fallen Guardian Posted June 4, 2011 Share Posted June 4, 2011 The first script you posted Timbob won't compile. I've tried fixing it with some results at least. int StartingConditional() { int iResult; iResult = GetGlobalNumber("MERC_ASSIGN"); if (iResult == 4) return iResult; } The only problem now is it says not all paths return a result. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.