|
楼主 |
发表于 2011-6-24 16:32:53
|
显示全部楼层
function Trig_War_Cry_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A06B'))
endfunction
function Trig_War_Cry_Actions takes nothing returns nothing
set udg_WarCry_P0[1]=GetSpellTargetLoc()
set udg_WarCry_P1[1]=GetUnitLoc(GetTriggerUnit())
set udg_WarCry_P2[1]=PolarProjectionBJ(udg_WarCry_P1[1],1000.00,AngleBetweenPoints(udg_WarCry_P1[1],udg_WarCry_P0[1]))
call ShowUnitHide(GetTriggerUnit())
call PolledWait(0.70)
call SetUnitPositionLoc(GetTriggerUnit(),udg_WarCry_P2[1])
call ShowUnitShow(GetTriggerUnit())
call SelectUnitForPlayerSingle(GetTriggerUnit(),GetOwningPlayer(GetTriggerUnit()))
call RemoveLocation(udg_WarCry_P0[1])
call RemoveLocation(udg_WarCry_P1[1])
call RemoveLocation(udg_WarCry_P2[1])
endfunction
//===========================================================================
function InitTrig_War_Cry takes nothing returns nothing
set gg_trg_War_Cry=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_War_Cry,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_War_Cry,Condition(function Trig_War_Cry_Conditions))
call TriggerAddAction(gg_trg_War_Cry,function Trig_War_Cry_Actions)
endfunction |
|