|
function a takes nothing returns nothing
local trigger b=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(b, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction(b, function c )
endfunction
function c takes nothing returns nothing
call KillUnit(GetTriggerUnit())
call DisplayTextToPlayer(Player(0), 0, 0, "ok")
endfunction
此代码有问题否? |
|