|
发表于 2011-6-3 16:48:08
|
显示全部楼层
[jass]globals
integer array udg_Killa_Iingter
multiboard udg_Panel
trigger gg_trg_Unit_Death
endglobals
function Trig_Unit_DeathConditions takes nothing returns boolean
return ((GetOwningPlayer(GetTriggerUnit()) == Player(10)) and (IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == false))
endfunction
function Trig_Unit_DeathActions takes nothing returns nothing
set udg_Killa_Iingter[1] = ( udg_Killa_Iingter[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + 1 )
call MultiboardSetItemValue( MultiboardGetItem(udg_Panel, GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ())), 1), I2S(udg_Killa_Iingter[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))]) )
local unit u = GetTriggerUnit()
call TriggerSleepAction(2)
call RemoveUnit(u)
set u = null
endfunction
//===========================================================================
function InitTrig_Unit_Death takes nothing returns nothing
set gg_trg_Unit_Death = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unit_Death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(gg_trg_Unit_Death, Condition(function Trig_Unit_DeathConditions))
call TriggerAddAction(gg_trg_Unit_Death, function Trig_Unit_DeathActions)
endfunction[/jass] |
|