• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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