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

[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