Seamhainn Posted January 19, 2008 Share Posted January 19, 2008 Hello! I copied this more or less from the Script, Source to check for availabilty for a dialogue line. Unfortunately it does not work. What is wrong here? int StartingConditional() { int iResult; iResult = (GetGlobalNumber("DAN_JEDI_PLOT") == 7); return iResult; } Thanks for any help! Link to comment Share on other sites More sharing options...
sekan Posted January 19, 2008 Share Posted January 19, 2008 Hello! I copied this more or less from the Script, Source to check for availabilty for a dialogue line. Unfortunately it does not work. What is wrong here? int StartingConditional() { int iResult; iResult = (GetGlobalNumber("DAN_JEDI_PLOT") == 7); return iResult; } Thanks for any help! Test if this script works. int StartingConditional() { int nResumeTalk=GetGlobalNumber("DAN_JEDI_PLOT"); return nResumeTalk == 7; } Link to comment Share on other sites More sharing options...
Seamhainn Posted January 19, 2008 Author Share Posted January 19, 2008 It works! Last question: how can I insure that the line is ALSO only spoken once? If that problem is solved the Garrum and Tar'eelok Restoration is done (I hope)! Thanks and take care Link to comment Share on other sites More sharing options...
Marius Fett Posted January 19, 2008 Share Posted January 19, 2008 I think you'd have to use the k_con_talkedto script Link to comment Share on other sites More sharing options...
Seamhainn Posted January 19, 2008 Author Share Posted January 19, 2008 I think you'd have to use the k_con_talkedto script No, unfortunately I can't use it, as the pc might or might not have talked to the npc before. Link to comment Share on other sites More sharing options...
Marius Fett Posted January 19, 2008 Share Posted January 19, 2008 You should still be able to use it... Just attatch it to a node that says welcome back or something... Link to comment Share on other sites More sharing options...
Seamhainn Posted January 19, 2008 Author Share Posted January 19, 2008 No, that will not work. Tar'eelok has - umong other lines - a line if the PC saved Juhani (and another if the PC killed Juhani). Both end the dialogue. The script that checks for the availabilities are: int StartingConditional() { int iResult; iResult = (GetGlobalNumber("DAN_JUHANI_PLOT") == 2); return iResult; } and int StartingConditional() { int iResult; iResult = (GetGlobalNumber("DAN_JUHANI_PLOT") == 3); return iResult; } Both work perfectly well, but both also end the dialogue and make the other dialogue nodes which follow unavailable. So I want that the check also secures that the dialogue line in question only is said once and with another conversation initiated the following dialogue nodes are available. EDIT: I know that is normally handled with a GlobalBoolean, but I don't know how that is scripted... EDIT2: I just found a Boolean called DAN_TAREEJ_DONE which the developers created for that specific purpuse. Is there a possibility if the Boolean is used anywhere else in the game? Link to comment Share on other sites More sharing options...
sekan Posted January 19, 2008 Share Posted January 19, 2008 This is the script that the game uses on beyala dialog //:: k_pdan_juhani01 /* Checks to see if DAN_BELAYAJ_DONE is FALSE (meaning she has not mentioned Juhani before) and that DAN_JUHANI_PLOT is 3 (meaning that Juhani has been saved). This conversation will not repeat as DAN_BELAYAJ_DONE is set to TRUE. */ //:: Created By: Peter T //:: Copyright (c) 2002 Bioware Corp. #include "k_inc_debug" int StartingConditional() { int iResult; iResult = ((GetGlobalBoolean("DAN_BELAYAJ_DONE") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 3)); if (iResult) SetGlobalBoolean("DAN_BELAYAJ_DONE", TRUE); return iResult; } So there is two options we have. We use a old Boolean from taris althought i don't now how to reset Boolean as the Booleans from taris may already have been set the true or we make a new Boolean this could althought conflict with other mods. However the script would look like these: #include "k_inc_debug" int StartingConditional() { int iResult; iResult = ((GetGlobalBoolean("tag_of_boolean") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 3)); if (iResult) SetGlobalBoolean("tag_of_boolean", TRUE); return iResult; } If player saved Jhuani #include "k_inc_debug" int StartingConditional() { int iResult; iResult = ((GetGlobalBoolean("tag_of_boolean") == FALSE) && (GetGlobalNumber("DAN_JUHANI_PLOT") == 2)); if (iResult) SetGlobalBoolean("tag_of_boolean", TRUE); return iResult; } If player killed jhuani Link to comment Share on other sites More sharing options...
Darkkender Posted January 19, 2008 Share Posted January 19, 2008 You can also create your own boolean variables in the Globals 2da file. Link to comment Share on other sites More sharing options...
sekan Posted January 19, 2008 Share Posted January 19, 2008 You can also create your own boolean variables in the Globals 2da file. Can i quote myself ? or we make a new Boolean this could althought conflict with other mods. Link to comment Share on other sites More sharing options...
Seamhainn Posted January 19, 2008 Author Share Posted January 19, 2008 I solved the problem (see my post above) as the developers seemed to have created the Boolean already :-) . I'll send the .mod file to sekan for testing now... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.