• 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] Enable passive after leaving combat

Status
Not open for further replies.
Level 2
Joined
Jun 2, 2013
Messages
12
Hello guys Hive;), I'm having trouble creating a spell, when my hero learn the spell 'Out of Combat', if he does not attack or be attacked within 5 seconds, your regeneration of mana/life will increase, and if was attacked regeneration back to normal, and so on.
thank you!
 
Make periodic trigger which regens life/mana and which also increases by each period.

If your hero gets attacked turn off this trigger and incease an attack_counter, and set the attack counter to a local integer. Then wait 5 seconds and check with if your local integer is still same as your attack counter, if yes turn on your healing trigger again.

Edit:
After attack set your regen/mana increase to 0 again, or next time it will start with last used values.
 
Last edited:
Status
Not open for further replies.
Top