- Joined
- Jan 24, 2009
- Messages
- 606
Here is the Code, I tried to make my vJASS Spell to use Timers, so I made a Loop_Action trigger.
here's the Code:
here's the Code:
JASS:
private function Loop_Action takes group whatGroup, unit caster, unit target, string Effect1, string Effect2, real x, real y, returns nothing
call GroupEnumUnitsInRange( whatGroup, x, y, 125., null)
call DestroyEffect(AddSpecialEffect( Effect1, x, y)
call DestroyEffect(AddSpecialEffect(Effect2, x, y)
set target = FirstOfGroup(whatGroup)
if IsUnitAlly(target, GetOwningPlayer(caster)) then
call SetWidgetLife(target, GetWidgetLife(target) + Heal(level))
else
call UnitDamageTarget(caster, target, Loopdam(level), true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL, null)
endif
endfunction