|
function Trig_________________001_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHca' ) ) then
return false
endif
return true
endfunction
function Trig_________________001_Actions takes nothing returns nothing
local unit unit_attackunit = GetSpellTargetUnit()
local unit Unit_abiltyunit = GetSpellAbilityUnit()
local location point = GetUnitLoc(GetSpellTargetUnit())
local real L = GetRandomDirectionDeg()
local location K = PolarProjectionBJ(point, 120.00, L)
local location array Point_creatunitLOOPM
local location array Point_creatunitLOOPN
local unit array unit_creatunitLOOPM
local unit array unit_creatunitLOOPN
local integer M
local integer N
call SetUnitPositionLocFacingLocBJ( Unit_abiltyunit, K, point )
call SetUnitAnimation( GetSpellAbilityUnit(), "attack slam" )
call RemoveLocation( K )
call TriggerSleepAction( 3 )
set M = 1
loop
exitwhen(M>6)
set M = M + 1
set Point_creatunitLOOPM[M] = PolarProjectionBJ(point, 300.00, ( I2R(M) * 60.00 ))
call CreateNUnitsAtLoc( 1, 'e001', GetOwningPlayer(GetSpellAbilityUnit()), Point_creatunitLOOPM[M], bj_UNIT_FACING )
set unit_creatunitLOOPM[M] = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 3.00, 'BHwe', unit_creatunitLOOPM[M] )
call IssueImmediateOrder( unit_creatunitLOOPM[M], "stomp" )
endloop
call TriggerSleepAction( 3 )
set N = 1
loop
exitwhen(N>12)
set N = N + 1
set Point_creatunitLOOPN[N] = PolarProjectionBJ(point, 450.00, ( I2R(N) * 30.00 ))
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), Point_creatunitLOOPN[N], bj_UNIT_FACING )
set unit_creatunitLOOPN[N] = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 3.00, 'BHwe', unit_creatunitLOOPN[N] )
call IssuePointOrderLoc( unit_creatunitLOOPN[N], "shockwave", point )
endloop
call TriggerSleepAction( 3 )
set K = PolarProjectionBJ(point, 120.00, L)
call SetUnitPositionLocFacingLocBJ( Unit_abiltyunit, K, point )
call SetUnitAnimation( GetSpellAbilityUnit(), "attack slam" )
set M = 1
loop
exitwhen(M>6)
set M = M + 1
call IssueImmediateOrder( unit_creatunitLOOPM[M], "stomp" )
call RemoveLocation( Point_creatunitLOOPM[M] )
endloop
call TriggerSleepAction( 3 )
set N = 1
loop
exitwhen(N>12)
set N = N + 1
call IssuePointOrderLoc( unit_creatunitLOOPN[N], "shockwave", point )
call RemoveLocation( Point_creatunitLOOPN[N] )
endloop
call RemoveLocation( point )
call RemoveLocation( K )
endfunction
//===========================================================================
function InitTrig_a takes nothing returns nothing
set gg_trg_a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_a, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_a, function Trig_________________001_Actions)
endfunction
能一直在目标点别的方向产生单位并制造效果
直到崩溃 |
|