In my trap mod I wanna give the player the option to choose between two different styles to manage the traps:
1. When activating a closed trap the player is prompted with a message box asking if he/she wants to "reset" or "pick up" the trap.
2. When activating a closed trap the player automatically picks up the trap.
Here's my code:
GlobalVariable Property HT_TrapMessageCheck AutoMiscObject Property HT_TrapReplacement AutoMessage Property HT_ActiTrapMessage Autoevent OnActivate(objectReference TriggerRef) int whichbutton = 0 if (HT_TrapMessageCheck == true) ; This is a global variable property that I want to set to true/false whichbutton = HT_ActiTrapMessage.Show() ; Show the message box if (whichbutton == 0) : Reset the trap playAnimationAndWait("Reset01","Trans02") goToState("Open") else ; Pick up the trap Delete() TriggerRef.AddItem(HT_TrapReplacement, 1, false) endif else ; Pick up the trap without showing the message box (automatically) Delete() TriggerRef.AddItem(HT_TrapReplacement, 1, false) endifendEventWhat I want to do is in another script set the global variable.
For example if the player activates something that makes a message box pop-up and ask which way the player prefers. But the player has to be able to open this menu anytime to change it, if he/she wants.
