• 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.

[Trigger] Minimum Wait

Status
Not open for further replies.
Why not using
  • Actions
  • Set Point1 = (Position of (Triggering unit))
  • For each (Integer A) from 1 to X, do (Actions)
    • Loop - Actions
      • If (All conditions are true) then do (Actions) else do (Actions)
        • If - Conditions
          • ((Region[(IntegerA)]) contains Point1) Equal to True
        • Then - Actions
          • <Actions>
        • Else - Actions
    • Custom script: call RemoveLocation (udg_Point1)
 
No, not working.

My triggers are like this (the first part of it) :

  • Press Switch
    • Events
      • Unit - A unit enters Left <gen>
      • Unit - A unit enters Middle <gen>
      • Unit - A unit enters Right <gen>
    • Conditions
    • Actions
      • Custom script: call TriggerSleepAction(0.01)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SwitchRegion[(Integer A)] contains (Entering unit)) Equal to True
              • SwitchDown[(Integer A)] Equal to False
            • Then - Actions
              • Destructible - Kill Switch[(Integer A)]
              • Sound - Stop (Last played sound) Immediately
              • Sound - Play Switch <gen> at 100.00% volume, located at (Center of SwitchRegion[(Integer A)]) with Z offset 0.00
              • Set SwitchDown[(Integer A)] = True
              • Set SwitchesPressed = (SwitchesPressed + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (SwitchRegion[Order] contains (Entering unit)) Equal to True
                  • WrongOrder Equal to False
                • Then - Actions
                  • Set Order = (Order + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Order Greater than 3
                    • Then - Actions
                      • Destructible - Open City Entrance 0003 <gen>
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • Set WrongOrder = True
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SwitchesPressed Greater than or equal to 3
                      • WrongOrder Equal to True
                    • Then - Actions
                      • Set WrongOrder = False
                      • Set Order = 1
                      • Set SwitchesPressed = 0
                      • For each (Integer A) from 1 to 3, do (Actions)
                        • Loop - Actions
                          • Destructible - Resurrect Switch[(Integer A)] with (Max life of Switch[(Integer A)]) life and Show birth animation
                          • Set SwitchDown[(Integer A)] = False
                    • Else - Actions
            • Else - Actions
May be with a complete view to the trigger you may be able to help me.

And forget about leak I will remove them later myself.
 
I don't get it; you have a trigger that fires when a unit enters a certain - specified region and then want a true statement of whether a unit is in another region? Then, why not using the other region (SwitchRegion) as the event instead?

I need to open a door after pressing the 3 foot switches in a certain order but I want it done in one trigger so if I increased the number of switches(lets say 9 switches) I still need one trigger to be easier to handle. I have done the system entierly I was just asking for improvement in that trigger that I posted so that the wait you see is to be minimum.
 
Status
Not open for further replies.
Top