|
function Trig_PLAYER_HERO_DEATHConditions takes nothing returns boolean
return ((IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true) and (GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER))
endfunction
function Trig_PLAYER_HERO_DEATHActions takes nothing returns nothing
local unit u = GetTriggerUnit()
call DisplayTextToForce( GetPlayersAll(), ( "|cFFFF0000" + ( GetUnitName(u) + ( "|r" + "|cFF00FF99死亡了。|r将在15秒后复活。" ) ) ) )
set udg_Death_Ingter[GetConvertedPlayerId(GetOwningPlayer(u))] = ( udg_Death_Ingter[GetConvertedPlayerId(GetOwningPlayer(u))] + 1 )
call MultiboardSetItemValue( udg_Panel, GetConvertedPlayerId(GetOwningPlayer(u)), 4), I2S(udg_Death_Ingter[GetConvertedPlayerId(GetOwningPlayer(u))]) )
set udg_Death_Hero = ( udg_Death_Hero + 1 )
call TriggerSleepAction(15.00)
call ReviveHeroLoc( u, udg_Set_Point[GetConvertedPlayerId(GetOwningPlayer(u))], true )
call DisplayTextToForce( GetPlayersAll(), ( "|cFFFF0000" + ( GetUnitName(u) + ( "|r" + "|cFF00FF99重生了|r" ) ) ) )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetTriggerUnit()), udg_Set_Point[GetConvertedPlayerId(GetOwningPlayer(u))], 0 )
set udg_Death_Hero = ( udg_Death_Hero - 1 )
set u = null
endfunction
//===========================================================================
function InitTrig_PLAYER_HERO_DEATH takes nothing returns nothing
set gg_trg_PLAYER_HERO_DEATH = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_PLAYER_HERO_DEATH, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(gg_trg_PLAYER_HERO_DEATH, Condition(function Trig_PLAYER_HERO_DEATHConditions))
call TriggerAddAction(gg_trg_PLAYER_HERO_DEATH, function Trig_PLAYER_HERO_DEATHActions)
endfunction
其他都还好:call MultiboardSetItemValue( udg_Panel, GetConvertedPlayerId(GetOwningPlayer(u)), 4), I2S(udg_Death_Ingter[GetConvertedPlayerId(GetOwningPlayer(u))]) )
这句话出问题了,什么问题呢? |
|