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?