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

rejunivation as trigger

Status
Not open for further replies.
Level 4
Joined
Dec 15, 2007
Messages
108
hi, how i can do that rejunivation heals as trigger? i testet differents thinks but now i havent any idea anymore thx for help
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Every Seconds
Pick Every Unit in map with Rej buff
increase their health

Unit Starts Effect of Ability
if its Rej
Custom script: local unit udg_TempUnit = GetSpellTargetUnit()
Unit - Add <self healing fountain of health ability> to TempUnit
Wait X seconds
Unit - Remove <self healing fountain of health ability> from TempUnit

Unit Starts Effect of Ability
if Ability is equal to (ability of Druids use)
Do Nothing because it already heals

Unit Starts effect of ability
If ability is Rej
Custom script:local unit u = GetSpellTargetUnit()
Custom script:local real heal = <heal per second>
Custom script:loop
Custom script:exitwhen GetUnitAbilityLevel(u,<Rejbuffrawcode>) = 0
Wait(1.0) second
Custom script:call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+heal)
Custom script:endloop
Custom script:set u = null
 
Status
Not open for further replies.
Top