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

Set Respawn For Gate

Status
Not open for further replies.
Level 2
Joined
Sep 9, 2013
Messages
8
Hi
really sorry for bothering

i need set respawn for all of my gate

for example after a gate destroyed after 2 min the gate back

i have 5 gate of one kind door
 
Level 10
Joined
Apr 18, 2009
Messages
601
Declare a Timer variable for each gate and trigger it.

When the gate dies, start its timer:
  • Gate Death
    • Events
      • Destructible - Gate (Horizontal) 0000 <gen> dies
    • Conditions
    • Actions
      • Countdown Timer - Start Gate00_RespawnTimer as a One-shot timer that will expire in 120.00 seconds
When a timer expires, resurrect its gate:
  • Gate Respawn
    • Events
      • Time - Gate00_RespawnTimer expires
    • Conditions
    • Actions
      • Destructible - Resurrect Gate (Horizontal) 0000 <gen> with (Max life of Gate (Horizontal) 0000 <gen>) life and Show birth animation
 
Level 10
Joined
Apr 18, 2009
Messages
601
No problem, glad it worked for you.

Making a more general system in GUI would require a lot of work. If it's just 5 gates we're talking about, I'd say making individual timers for each gate and triggering them all it way worth it. Maybe there's some JASS coders out there that would disagree though.

To make a more general system such as "whenever a descructible of gate type dies start a timer and whenever such a timer dies respawn said gate" would require systems for dealing with multiinstanceabilty for timers, picking all destructibles of gate type on the map (which might need adding events to other triggers etc.) and that kind of nasty stuff.
 
Status
Not open for further replies.
Top