• 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] Limited times pasive skill

Status
Not open for further replies.
Level 1
Joined
Jun 15, 2011
Messages
5
Hi Hive.

We are needing a limited times pasive skill for my custom unit.

Like [3] 100% Evade, that will evade 3 attacks with 100% chance and the skill will turn off / dissapper for ever.

:ogre_hurrhurr:

TY.
peonpower01.gif
 
Level 8
Joined
Mar 22, 2008
Messages
422
I be leave your best bet would be to make a dummy spell and then trigger it. Then after the affect has proced x times remove the spell from the unit.

But also make it so the spell gives a buff that way when the buff is gone the trigger no longer effects the unit with the buff.
 
Level 11
Joined
Jul 7, 2010
Messages
709
  • Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Avatar for (Triggering unit)) Greater than 0
    • Actions
      • Set Index = (Index + 1)
      • Set Integer[Index] = (Integer[Index] + 1)
      • For each (Integer A) from 1 to Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Integer[Integer A] Less than 3
            • Then - Actions
              • Unit - Remove Avatar from (Triggering unit)
              • Set Index = (Index - 1)
            • Else - Actions
I have test map.
Avatar = You'r Spell. Which is 100% Evade
EDIT: I think this fails... idk
 
Level 1
Joined
Jun 15, 2011
Messages
5
i dont need exactly evasion skill.
i mean, i need limited times pasive skills,
like evasion, like critical strike, like bash...

limited like sentinels owl (that must be put on tree)
but for pasive skills
 
Level 5
Joined
Sep 1, 2010
Messages
168
Add abilities to a hidden spellbook, depending on how well you wanna code, either detect when an attack does damage (if you use an damage detection system) or whenever a unit attacks/ is attacked.
Whenever this event happens, set an integer in a hashtable (2nd index is the key of the unit) to a lower value, if value reaches 0, remove the ability from the spellbook (and bepending on other stuff in the hash clear all childs of the hashtable (key(triggeringunit))).
 
Status
Not open for further replies.
Top