• 🏆 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!

[JASS] Is there a Problem here?

Status
Not open for further replies.
Level 10
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:
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
 
Status
Not open for further replies.
Top