Scripting help - OnActivate on an NPC

Post » Sat Sep 15, 2012 5:05 am

I have the following setup in an OnActivate block which is attached to an NPC:

Begin OnActivateset button to GetButtonPressedShowMessage aaaMessageSquadCommandsIndvif button == 0  set SubMenu to 7elseif button == 1  SetAV variable03 1elseif button == 2  SetAV variable03 2elseif button == 3  SetAV variable03 3End

The script runs fine, except in order for a variable to be set, I must activate the NPC twice.

e.g. I press E to 'talk' to the NPC, which brings up the message correctly. I then choose a button and the message closes, but the NPC remains standing there. If I then activate the NPC again and choose any button, the NPC will perform the action I originally selected in the beginning.

Am I missing something obvious?
User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Return to Fallout 3