Donglic Posted April 1, 2015 Posted April 1, 2015 Is there some sort of way I could add dialogue through a script. example: walk through a walkway with a tigger in it, the trigger script had "add dialogue topic related"
Guest Posted April 1, 2015 Posted April 1, 2015 You put a specific condition on that topic, for example a variable on a script attached to a quest. Then you set that variable when you go on the trigger. When you make a quest and you have events happening etc. you usually make a support quest which contains variables and tracks down these events. So you create this quest and declare the variable: scn MyQuest int bMyVariable Then you create the trigger and make its script, which sets the variable: scn MyTriggerScript Begin OnActivatePlayer Let MyQuest.bMyVariable := 1 End And since the topic condition will be something like this... Topic condition: GetQuestVariable MyQuest.bMyVariable == 1 ...this topic won't appear until you don't go through the trigger
Donglic Posted April 2, 2015 Author Posted April 2, 2015 thank you tons, would you know how to do forced dialogue? I've been trying hard the last few days i have all the dialogue made and scripts don it isnt working for me this is the quest script: (sorta pathetic following YT tut) SCN DarrenDukeYoullNeverWalkAloneQuestScript short talking This is the trigger for it: SCN DarrenDukeForcedDialogueTriggerScript01 Short Triggered begin OnTriggerEnter Player if [Triggered ==0] GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest set DarrenDukeYoullNeverWalkAloneQuest.talking to 1 set triggered to 1 endif end I have my Packages done and the trigger in place, it is supposed to happen if "GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest 10" but it never works. any help would be apretiated
Guest Posted April 3, 2015 Posted April 3, 2015 Because there's a mistake on the script: begin OnTriggerEnter Player if Triggered == 0 IF GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest set triggered to 1 set DarrenDukeYoullNeverWalkAloneQuest.talking to 1 ENDIF endif The parenthesys [] and the missing IF ENDIF - if you need parenthesis, you use (), square parenthesis are used on arrays. A trick to understand what's happening in your scripts, especially in the future when they'll become more complicated. I use PrintC often. However it requires you install NVSE for GECK too. begin OnTriggerEnter Player if Triggered == 0 IF GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest set triggered to 1 set DarrenDukeYoullNeverWalkAloneQuest.talking to 1 PRINTC "THE TRIGGER TRIGGERED!" ENDIF endif So, for example, that sentence won't appear in console if... - the script doesn't fire - you forgot to add it to the trigger - you forgot to flag persistent reference and you're on a esm - etc. - the script silently crashes before that line So, when I have a silent crash and I really can't find the syntax mistake, I use a drastic solution begin OnTriggerEnter Player if Triggered == 0 PRINTC "1" IF GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest PRINTC "2" set triggered to 1 PRINTC "3" set DarrenDukeYoullNeverWalkAloneQuest.talking to 1 PRINTC "4" ENDIF endif This could seem silly, but when I have hundreds lines and I really can't find the mistake, it helps me a lot to understand the exact moment when the script crashes, it's when it stops writing numbers on console.
Guest Posted April 3, 2015 Posted April 3, 2015 EDIT: I didn't see this it is supposed to happen if "GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest 10" If you mean the code must execute when the stage is 10, then you need GetStage, something like "If (GetStage DarrenDukeYoullNeverWalkAloneQuest == 10)" But it's better if you explain what you want to do, then I try to code it (or someone else) By the way: IF GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest == 1 and IF GetQuestRunning DarrenDukeYoullNeverWalkAloneQuest both return true when the quest's running, that's why it's different from what Tomm wrote on Nexus but they both will work
Donglic Posted April 4, 2015 Author Posted April 4, 2015 so basically I've made a companion mod, and I'm stretching it out at a long length like a full blown quest. It starts once you've retired all the dialogue about where he's from and who his friends are. you ask if he'd like to see his friends and you go to the quest location. once outside and you've dealt with the raiders at the entrance of said location he triggers forced dialogue about what happened at said place. If the player has done the small unmarked quest initially in the game that is already here, he has 2 dialogue options. 1 being "what the hell happened here" and the other being "welcome to my home". basically i just want to know how to force dialogue. and this is him in alpha with only 35 dialogue topics. http://www.nexusmods.com/newvegas/mods/58450/? Right now unreleased version has nearly 175!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.