• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Spell] How to do Invulnerability ability?

Status
Not open for further replies.
Level 18
Joined
Jan 12, 2011
Messages
1,512
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 18
Joined
Jan 12, 2011
Messages
1,512
Ok here it is
b9g5c2.png
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,239
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