jastey Posted October 19, 2004 Share Posted October 19, 2004 Hi everyone, I know this should be avoided, but *if* I wanted to add an interjection for my NPC after a PC reply, what would be the correct way of doing this? Say the original dialogue goes like this IF ~~ THEN 25 SAY ~Please help me bla bla.~ ++ ~Yes, of course.~ + 26 ++ ~No way.~ + 27 END Now I want my NPC to get active if the PC chooses the second (rejecting) answer. I would code it like this: ADD_TRANS_TRIGGER DLGNAME 25 ~!IsValidForPartyDialog("myguy")~ to make sure the changes will be active if myguy has the opportunity to talk, and then EXTEND_BOTTOM DLGNAME 25 + ~IsValidForPartyDialog("myguy")~ + ~Yes, of course.~ + 26 + ~IsValidForPartyDialog("myguy") Global("MyguyHelp","GLOBAL",0)~ ~No way.~ EXTERN MYGUY help END APPEND MYGUY IF ~~ THEN BEGIN help SAY ~Hey! Of course we'll help!~ IF ~~ THEN DO ~SetGlobal("MyguyHelp","GLOBAL",1)~ EXTERN DLGNAME 26 END END Is this correct and fair coded? Is the "Global("MyguyHelp","GLOBAL",0)" a good idea in this case? Thanks! Link to comment
jcompton Posted October 19, 2004 Share Posted October 19, 2004 More or less. If you're coding the dialogue from scratch, though, there's no reason to avoid it, and no reason to do it in two pieces of code. You'd just do IF ~~ THEN 25 SAY ~Please help me bla bla.~ + ~!IsValidForPartyDialog("myguy")~ + ~Yes, of course.~ + 26 + ~IsValidForPartyDialog("myguy")~ + ~Yes, of course.~ EXTERN myguy state (and you'd avoid using actual counting numbers as your state numbers.) It's generally done very sparingly with Bioware DLGs because the trouble is that it's next to impossible to preserve multiple mod changes. Better to interject after the reaction line. Link to comment
jastey Posted November 22, 2004 Author Share Posted November 22, 2004 Thanks. I meant adding to an existing dialogue, and only wanted to know whether it would be coded right, though I see the point that it's to be avoided due to compatibility reasons. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.