• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Foot switch/variables questions

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
How do you use Foot switches, and how do you get the game to register that they are up/down. What variables would you use, and could you make it so that if switch 1 and 2 are down open closed door kinda thing, again what variables would I need? thanks
 
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set GateA = Iron Gate (Horizontal) 0002 <gen>
      • Set LeverA[1] = Lever 0000 <gen>
      • Set LeverA[2] = Lever 0001 <gen>
      • Set LeverA_Toggle[1] = 0.00
      • Set LeverA_Toggle[2] = 0.00
And for the actual action trigger
  • GateA
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Dying destructible) Equal to LeverA[1]
              • LeverA_Toggle[1] Equal to 0.00
        • Then - Actions
          • Set LeverA_Toggle[1] = 1.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Dying destructible) Equal to LeverA[2]
              • LeverA_Toggle[2] Equal to 0.00
        • Then - Actions
          • Set LeverA_Toggle[2] = 1.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • LeverA_Toggle[1] Equal to 1.00
              • LeverA_Toggle[2] Equal to 1.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GateA_Toggle Equal to 1.00
            • Then - Actions
              • Destructible - Close GateA
              • Set GateA_Toggle = 0.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GateA_Toggle Equal to 0.00
                • Then - Actions
                  • Destructible - Open GateA
                  • Set GateA_Toggle = 1.00
                • Else - Actions
          • Wait 3.00 seconds
          • Destructible - Resurrect LeverA[1] with (Max life of (Last created destructible)) life and Show birth animation
          • Destructible - Resurrect LeverA[2] with (Max life of (Last created destructible)) life and Show birth animation
          • Set LeverA_Toggle[1] = 0.00
          • Set LeverA_Toggle[2] = 0.00
        • Else - Actions
I quite like my triggers. :)
 
Status
Not open for further replies.
Top