|
[codes=jass]function Trig_AOmi_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'AOmi'
endfunction
function Trig_AOmi_Func003A takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit ua
if (not(GetUnitTypeId(GetFilterUnit()) != GetUnitTypeId(u))) then
set ua = CreateUnit(GetOwningPlayer(u),'n00E',GetUnitX(u),GetUnitY(u),0.00)
call UnitApplyTimedLife(ua,'BHwe',1)
call ShowUnit(ua,false)
call IssueTargetOrderById(ua,852274,GetFilterUnit())
endif
set u = null
set ua = null
endfunction
function Trig_AOmi_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
call TriggerSleepAction(2.00)
call GroupEnumUnitsInRange(udg_TempGroup,GetUnitX(u),GetUnitY(u),1500,Condition(function Trig_AOmi_Func003A))
set u = null
endfunction
//===========================================================================
function InitTrig_AOmi takes nothing returns nothing
set gg_trg_AOmi = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_AOmi,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_AOmi,Condition(function Trig_AOmi_Conditions))
call TriggerAddAction(gg_trg_AOmi,function Trig_AOmi_Actions)
endfunction[/codes]这是模仿CH剑圣的分身,用技能时没发现什么问题.不过不知道用call TriggerSleepAction(2.00)会不会有问题呢? |
|