- Joined
- Sep 9, 2007
- Messages
- 6,759
JASS:
function func_s1_Func001002002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetTriggerPlayer()) == true )
endfunction
function func_s1_Actions takes nothing returns nothing
local effect array R_Release_Effect
local group R_Release_Group = null
local unit R_Release_Unit = null
local real R_Release_Real1 = 0.00
local real R_Release_Real2 = 0.00
local location R_Release_Tmp_Loc = null
local location R_Release_Tmp_Loc2 = null
local integer R_Release_Tmp_Integer = 0
set R_Release_Group = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function func_s1_Func001002002))
set R_Release_Unit = GroupPickRandomUnit(R_Release_Group)
set R_Release_Group = null
set R_Release_Real1 = 0.00
set R_Release_Real2 = 125.00
set R_Release_Tmp_Loc = GetUnitLoc(R_Release_Unit)
set R_Release_Tmp_Integer = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 200
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set R_Release_Real1 = ( R_Release_Real1 + 3.60 )
set R_Release_Real2 = ( R_Release_Real2 + 1.10 )
set R_Release_Tmp_Loc2 = PolarProjectionBJ(R_Release_Tmp_Loc, R_Release_Real2, R_Release_Real1)
call AddSpecialEffectLocBJ( R_Release_Tmp_Loc2, "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl" )
call RemoveLocation(R_Release_Tmp_Loc2)
set R_Release_Tmp_Integer = ( R_Release_Tmp_Integer + 1 )
set R_Release_Effect[R_Release_Tmp_Integer] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(R_Release_Tmp_Loc)
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 200
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set R_Release_Tmp_Integer = GetForLoopIndexA()
call TriggerSleepAction( ( 0.01 / 100.00 ) )
call DestroyEffectBJ( R_Release_Effect[R_Release_Tmp_Integer] )
set R_Release_Effect[R_Release_Tmp_Integer] = null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function Init_s1 takes nothing returns nothing
local trigger func_s1
set func_s1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( func_s1, Player(0), "-r release", true )
call TriggerAddAction( func_s1, function func_s1_Actions )
endfunction
What did I wrong? Nothing happens at all, and I don't see the spell, only the wc3 is crashing after some seconds after init.