|
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[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] = ( 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( loc_u() )
set loc_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菜鸟,这是我第一次写Jass,各位Jass大大别笑话。最好能帮我看下错误。 |
|