• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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