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

Help - Event unit loses buff? and Custom Mana Shield

Status
Not open for further replies.
Level 3
Joined
Jan 10, 2012
Messages
31
Hello, I was wondering if there was a way to make an event that triggers when a unit loses a buff I.E mana shield? I have a spell idea: "Death Shield" for lack of originality, anyway what it does is while the shield is held the unit will gain 5% life every 10 seconds and 12% mana every 3 seconds, is there any way to trigger this without have to use "event every 3 seconds, and another trigger event every 5 seconds"? because I think that would lag a lot with all my over spells and such xD
 
Level 3
Joined
Jan 10, 2012
Messages
31
I have a damage detection system :D, and how do I trigger "mana shield deactivated" or what have you?

Also, it seems that mana shield is bugged, I have mana shield set to .02 mana per hit point, and I tested it with a guy who hits for 1 damage and it was taking 50+ mana from my unit per swing, what the heck? I figured out the mana shield thing now, this is a edit post lol, anyway the "Data - mana per hit point" thing is confusing, by setting it to 50 it now will absorb 50 damage before it takes mana, mind:blown

Figured it out :D : trigger 1
Death Shield p2
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Death Shield (N - Mana Shield 3.1)
Actions
Unit - Set life of (Triggering unit) to ((Percentage life of (Triggering unit)) + 35.00)%
Unit - Set mana of (Triggering unit) to ((Percentage mana of (Triggering unit)) + 50.00)%
Countdown Timer - Start DeathShield as a Repeating timer that will expire in 5.00 seconds

and trigger 2:
Death Shield
Events
Time - DeathShield expires
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Nosticus 0184 <gen> has buff Death Shield ) Equal to True
Then - Actions
Unit - Set life of Nosticus 0184 <gen> to ((Percentage life of Nosticus 0184 <gen>) + 5.00)%
Unit - Set mana of Nosticus 0184 <gen> to ((Percentage mana of Nosticus 0184 <gen>) + 12.00)%
Game - Display to (All players) the text: Death Shield Restor...
Else - Actions
Countdown Timer - Pause DeathShield
 
Last edited by a moderator:
If you wanna check if hero activated or deactivated "mana shield" use a If/Then/Else in your first trigger:

If (triggering unit has buff Death Shield) = true
Then: Your actions
Else: Stop timer (or whatever you wanna do when he deactivates it)

And i would you suggest not to use Nosticus 0184 <gen> as reference, because once he died it wont work anymore, so it only works for exactly this one Nosticus 0184 <gen> who stays there in your map by default.
 
Status
Not open for further replies.
Top