• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

how to open the gate in batches?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
87
when i have the entrance on the map (total of 6 gates)
how to get to a certain time it will open the door from left to right (or vice versa) for a few seconds and then from door 1 close door 2 open
1690797507912.png
 
Level 25
Joined
Feb 27, 2019
Messages
846
If the destructibles are set to arrays they can be indexed and accessed via their number in the array.
  • Gate Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set VariableSet Gate[0] = Demonic Gate (Horizontal) 0000 <gen>
      • Set VariableSet Gate[1] = Demonic Gate (Horizontal) 0001 <gen>
      • Set VariableSet Gate[2] = Demonic Gate (Horizontal) 0002 <gen>
In this case the modulo calculation keeps the index from getting higher than 2 and returns it to 0.
1 mod 3 = 1
2 mod 3 = 2
3 mod 3 = 0
  • Gate Open Close
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Close Gate[GateIndex]
      • Set VariableSet GateIndex = ((GateIndex + 1) mod 3)
      • Destructible - Open Gate[GateIndex]
 
Status
Not open for further replies.
Top