Trigger script on dialog

Post » Tue Dec 29, 2009 7:58 am

I have a script attached to an NPC. How do I perform an action based off the player starting a dialog with that NPC. Something like ondialog would seem appropriate (but doesn't exist). How do you do this?
User avatar
Marie Maillos
 
Posts: 3403
Joined: Wed Mar 21, 2007 4:39 pm

Post » Tue Dec 29, 2009 11:33 am

You can simply use OnActivate:

if ( OnActivate == 1 )	Activate	; Do something else.endif


Or, you can introduce a short variable that gets set to a specific value in the NPC's unique high level greeting (from dialog). You can use the results box of the greeting to perform script tasks too.
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Tue Dec 29, 2009 6:15 am

Thank you for the feedback.
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm


Return to III - Morrowind