Quote (SunCreep)
CountPlayersInForceBJ(GetPlayersAllies(Player(4)))
нужно указать игрока, а не группу игроков это рас.
А два то что у тебя там и группы игроков-то не получаеться
Добавлено (27.08.11, 01:55)
---------------------------------------------
Code
function Trig_____________________________________003_Actions takes nothing returns nothing
local string s = ""
local force f = CreateForce()
local integer i = 0
local player p
call ForceEnumAllies(f, Player(4), null)
loop
set p = ForcePickRandomPlayer(f)
if GetLocalPlayer() == p then
set s = I2S(R2I(GetUnitLifePercent(udg_Hero[( GetForLoopIndexA() - 1 )])))
endif
call ForceRemovePlayer(f,p)
set i = i + 1
exitwhen i ==12
endloop
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), s )
endfunction
//===========================================================================
function InitTrig_____________________________________003 takes nothing returns nothing
set gg_trg_____________________________________003 = CreateTrigger( )
call TriggerAddAction( gg_trg_____________________________________003, function Trig_____________________________________003_Actions )
endfunction
Добавлено (27.08.11, 02:07)
---------------------------------------------
Сделаю код поменьше
Code
function Trig_____________________________________003_Actions takes nothing returns nothing
local string s = ""
local force f = CreateForce()
call ForceEnumAllies(f, Player(4), null)
if IsPlayerInForce(GetLocalPlayer(), f)) then
set s = I2S(R2I(GetUnitLifePercent(udg_Hero[( GetForLoopIndexA() - 1 )])))
endif
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), s )
endfunction
//===========================================================================
function InitTrig_____________________________________003 takes nothing returns nothing
set gg_trg_____________________________________003 = CreateTrigger( )
call TriggerAddAction( gg_trg_____________________________________003, function Trig_____________________________________003_Actions )
endfunction
Добавлено (27.08.11, 02:42)
---------------------------------------------
Code
function Trig_HitPoints_Actions takes nothing returns nothing
local string s = ""
local force f = CreateForce()
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 11
call ForceEnumAllies(f, Player(4), null)
if IsPlayerInForce(GetLocalPlayer(), f) then
set s = I2S(R2I(GetUnitLifePercent(udg_Hero[( GetForLoopIndexA() - 1 )])))
endif
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set bj_forLoopAIndex = bj_forLoopAIndex + 1
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), s )
endloop
endfunction
//===========================================================================
function InitTrig_HitPoints takes nothing returns nothing
set gg_trg_HitPoints = CreateTrigger( )
call TriggerAddAction( gg_trg_HitPoints, function Trig_HitPoints_Actions )
endfunction
наДобавлено (27.08.11, 05:17)
---------------------------------------------
клоз