JASS:
scope RetsuBoom
private struct RetsuBoom
static timer t = CreateTimer()
static unit caster
static effect prep
static effect flash
static effect periodic
static sound RetsuW1Voiceline
static sound RetsuW2Voiceline
static method filterGroupUnit takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(caster))
endmethod
static method damageTargets takes nothing returns nothing
call DisplayTimedTextToPlayer(Player(0), 0, 0, 1, "Damaging: "+GetUnitName(GetEnumUnit()))
call UnitDamageTarget(caster, GetEnumUnit(), 200, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, null)
endmethod
static method removeEffect takes nothing returns nothing
call DestroyEffect(prep)
call DestroyEffect(flash)
endmethod
static method onFinish takes nothing returns nothing
call PauseUnitEx(caster, false)
call SetUnitInvulnerable(caster, false)
call TimerStart(t, 3, false, function thistype.removeEffect)
endmethod
static method onCast3 takes nothing returns nothing
local group targets = null
call SetUnitAnimationByIndex(caster, 5)
call QueueUnitAnimation(caster, "stand")
call DisplayTimedTextToPlayer(Player(0), 0, 0, 1, "I ran")
call DestroyEffect(AddSpecialEffect("Effect Blue Ranbu.mdx", GetUnitX(caster), GetUnitY(caster)))
set RetsuW2Voiceline = CreateSound("Sounds\\RetsuW2Voice.mp3", false, false, false, 12700, 12700, "")
call StartSoundEx(RetsuW2Voiceline, true)
call PauseUnitEx(caster, true)
call SetUnitInvulnerable(caster, true)
// v This is the part thats not working v
call GroupEnumUnitsInRange(targets, GetUnitX(caster), GetUnitY(caster), 600, Filter(function thistype.filterGroupUnit))
call ForGroup(targets, function thistype.damageTargets)
// ^ This is the part thats not working ^
call TimerStart(t, 0.5, false, function thistype.onFinish)
endmethod
static method onCast2 takes nothing returns nothing
set flash = AddSpecialEffectTarget("blinknew2.mdx", caster, "overhead")
call BlzSetSpecialEffectZ(flash, GetUnitZ(caster)+300)
call BlzSetSpecialEffectTimeScale(flash, 1.5)
call TimerStart(t, 1.5, false, function thistype.onCast3)
endmethod
static method onCast1 takes nothing returns nothing
set caster = GetTriggerUnit()
set RetsuW1Voiceline = CreateSound("Sounds\\RetsuW1Voice.mp3", false, false, false, 12700, 12700, "")
call StartSoundEx(RetsuW1Voiceline, true)
set prep = AddSpecialEffectTarget("RetsuW_Prep.mdx", caster, "origin")
call BlzSetSpecialEffectColor(prep, 5, 5, 255)
call BlzSetSpecialEffectTimeScale(prep, 0.5)
call BlzSetSpecialEffectZ(prep, GetUnitZ(caster)+50)
call TimerStart(t, 0.5, false, function thistype.onCast2)
endmethod
static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent('A000', function thistype.onCast1)
endmethod
endstruct
endscope
The part I'm struggling with is in method "onCast3", specifically GroupEnumUnitsInRange what is the reason its not working? I tried printing the units name, but nothing shows up. I'm not entirely sure how to fix it
Last edited: