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

Gate

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
When you attack a lever, that means it dies. When the lever dies, you open/close/destroy the gate. You can set the lever back to alive then if you want to use it again. In that case, make a If/Then/Else command with a boolean condition that checks if the gate is opened or closed, and make the Then Actions open the gate when it's closed, and close the gate when opened.
 
Level 7
Joined
Jun 16, 2008
Messages
327
The function Rethon wants can be done using the same lever and gate with only two seperate triggers.

First, create one new trigger in the trigger editor (F4).

  • Open-Gate Trig
  • Events
    • Destructible - (Your Lever) <gen> dies
  • Conditions
    • GateOpen Equal to False
  • Actions
    • Set Gateopen = True
    • Destructible - Open (Your Gate) <gen>
    • Wait 2.50 seconds
    • Destructible - Resurrect (Your Lever) <gen> with (Max life of (Your Lever) <gen>) life and Hide birth animation
The GateOpen variable was a boolean, and it's default is false, as the gate is automatically closed when the game starts, so be sure to set it to false in a seperate initialization trigger.

Now, we're going to create the Closing Gate trigger:

  • Close-Gate Trig
  • Events
    • Destructible - (Your Lever) <gen> dies
  • Conditions
    • GateOpen Equal to True
  • Actions
    • Set Gateopen = False
    • Destructible - Close (Your Gate) <gen>
    • Wait 2.50 seconds
    • Destructible - Resurrect (Your Lever) <gen> with (Max life of (Your Lever) <gen>) life and Hide birth animation
And there, that's pretty much it. It should work, so try it out. :)
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
When you attack a lever, that means it dies. When the lever dies, you open/close/destroy the gate. You can set the lever back to alive then if you want to use it again. In that case, make a If/Then/Else command with a boolean condition that checks if the gate is opened or closed, and make the Then Actions open the gate when it's closed, and close the gate when opened.

As you see, that's exactly what I said already.
 
Status
Not open for further replies.
Top