• 🏆 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!

[Spell] Make a target unit invulnerable for short time

Status
Not open for further replies.
Level 7
Joined
May 29, 2011
Messages
237
Hello friends. I want make a spell, which make a target unit invulnerable for short time. I try it with triggers, but then the target unit is invulnerable for ever. Please help me.

  • Holy Shield
    • Ereignisse
      • Unit - A unit starts the effect of a ability
    • Bedingungen
      • (Ability being cast) equal Holy Shield
    • Aktionen
      • Wait until (((Target unit of ability being cast) has buff Holy Shield ) Gleich True), checking every 0.10 seconds
      • Unit - Add Invulnerable (Neutral) to (Target unit of ability being cast)
      • Wait until (((Target unit of ability being cast) has buff Holy Shield ) Gleich False), checking every 1.00 seconds
      • Unit - Remove Invulnerable (Neutral) from (Target unit of ability being cast)

I know that waitactions are not good. But tell me then, what is better.


[Highlight]Thank you for view this thread[/code]
 
Level 6
Joined
Oct 1, 2012
Messages
166
I'm not sure, but it might be because of 'Target of Ability Being Cast' doesn't fit there.
That is, the Holy Shield is self-cast, I presume? If so, change the unit to 'Casting Unit' or 'Trigger Unit'. This can leak, I am jass-lover, I don't do GUI :D
 
Last edited:
Level 6
Joined
Oct 1, 2012
Messages
166
Well, if it is so

Simply create a variable of Unit Group type and add the (Target unit of ability being cast) after it gets the given buff. Let's call the variable HolyShieldGroup.

Afterwards you can make another trigger which takes place every 1.0 secs and checks every unit in HolyShieldGroup whether or not it has the given buff. If not, remove invulnerable from it and kick the unit out of the group.

I'd post the triggers, but I have polish version of wc3 only, so...
 
Level 7
Joined
May 29, 2011
Messages
237
I can do this in MUI Spell when do you need it?.

Thank you, but Daffa was faster O_O
@Daffa: Have made this trigger by myself and its works... but yours is still better(of course by my skill). Will test it now.


Update:

Works and a better scrypt then mine.
Succes=+Rep, +Credits in map

[highlight]Thank you[/code]
 
Last edited:
Status
Not open for further replies.
Top