|
-
-
- function Trig_unitdeath_Actions takes nothing returns nothing
- local unit a = GetTriggerUnit()
- local location b = GetUnitLoc(a)
- local real c = GetUnitFacing(a)
- local player aa = GetOwningPlayer(a)
- local integer ty = GetUnitTypeId(a)
- call RemoveUnit (a)
- call PolledWait(2)
- call CreateUnit(aa,ty,GetLocationX(b),GetLocationY(b),c)
- call RemoveLocation(b)
- set a =null
- set b =null
- set c = 0
- set aa =null
- set ty =0
- endfunction
- //===========================================================================
- function InitTrig_unitdeath takes nothing returns nothing
- set gg_trg_unitdeath = CreateTrigger( )
- call TriggerRegisterAnyUnitEventBJ( gg_trg_unitdeath, EVENT_PLAYER_UNIT_DEATH )
- call TriggerAddAction( gg_trg_unitdeath, function Trig_unitdeath_Actions )
- endfunction
复制代码 |
|