Aller au contenu

Photo

Changing plot flag when going over a trigger


1 réponse à ce sujet

#1
Calneon

Calneon
  • Members
  • 18 messages
Is this possible? Or to change it when you enter an area. I want to quest to start when you enter my first area.

EDIT: Another thing, how does the surrendering enemy work? I see the variables, which i've set as follows:

SURR_DIALOG_OVERRIDE - not sure what to do with this one
SURR_INIT_CONVERSATION - 1
SURR_PLOT_FLAG - 1 (the flag in my quest which is meant to be true when the enemy is slain)
SURR_PLOT_NAME - the plot resource with the flag in it

However, the enemy isn't surrendering when he's on low health, and the quest isn't being updated.

Modifié par Calneon, 08 juin 2010 - 04:52 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
For surrenders, make sure you set the creature as immortal,otherwise it will only trigger if they are reduced to exactly 1 health by chance.



It's possible to set plot flags on triggers or on area enters. For an area, make sure you have a custom area script assigned to the area. Open it, use the area script template if you haven't already, and in the AREALOAD_PRELOADEXIT event, put whatever scripting you want. WR_SetPlotFlag is what you'd use to set a plot flag. Be aware that without some kind of control that flag will fire every time you enter the area, potentially setting the journal back the beginning even after you've completed the quest.



For a trigger, you either want to use a custom trigger or a talk trigger. The talk trigger is the simplest. Just draw an instance of gentr_talk into your area. In the local variables, use TRIG_TALK_SET_PLOT and TRIG_TALK_SET_FLAG for your plot flag. Leave everything else empty and all it will do is set the flag. It will do it only once (unless you set TRIG_TALK_REPEAT to 1) and it will only do it for party members. You can use the other variables to control when the trigger will work, and also set an additional plot flag or start a conversation.



You can also make a custom trigger and a custom trigger script, using the trigger events template. Within the enter event you can do whatever scripting you want.