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

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 24
Joined
Feb 27, 2019
Messages
833
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