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

[Spell] How to do Invulnerability ability?

Status
Not open for further replies.
Level 19
Joined
Jan 12, 2011
Messages
1,523
Well im working on a map like DotA but with "Harder" gameplay (if i can call it like that)..
well the only problem is that i dont know how to do the trigger for Tower invulnerability that u do on your circle of power for 5 seconds :S can someone help me?
oh yeah i made 1 but the problem is that the Invulnerability doesnt go away after the 5 seconds
:vw_wtf:
 
Level 19
Joined
Jan 12, 2011
Messages
1,523
Ok here it is
b9g5c2.png
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You can not use TriggerSleepAction (behind GUI waits) inside an enum (for unit in group do loop). Doing so results in an immediate thread crash.

Rather add all these buildings to an array list and then itterate through all the units and apply the effect. After doing that start a timer for 5 seconds. When the timer expires you then itterate through all the buildings and remove the effect.

2 Triggers.
1. Register when cast -> add effect to appropiate buildings -> start timer for 5 seconds
2. Register when timer expires -> remove effect from all buildings.
 
Status
Not open for further replies.
Top