• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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