- Joined
- Nov 3, 2013
- Messages
- 989
I can't seem to find where the missing end block is...
When I disabled this trigger it disappeared so it's somewhere here.
All it's supposed to do is split all 12 players + 3 neutrals into 3 teams.
When I disabled this trigger it disappeared so it's somewhere here.
All it's supposed to do is split all 12 players + 3 neutrals into 3 teams.
JASS:
function Trig_Map_Inital_Player_Team_Settings_Actions takes nothing returns nothing
local integer i = 0
local integer j
local player p
loop
exitwhen i > 14
p = Player(i)
j = 0
if ModuloInteger(i, 3) == 0 then // team 0
call ForceAddPlayer( udg_mapInit_playerG_team[0], p )
loop
if j == i then j = j + 1 endif
exitwhen j > 14
if ModuloInteger(j, 3) == 0 then
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_UNALLIED )
endif
set j = j + 1
endloop
elseif ModuloInteger(i, 3) == 1 then //Team 1
call ForceAddPlayer( udg_mapInit_playerG_team[1], p )
loop
if j == i then j = j + 1 endif
exitwhen j > 14
if ModuloInteger(j, 3) == 1 then
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_UNALLIED )
endif
set j = j + 1
endloop
elseif ModuloInteger(i, 3) == 2 then //team 2
call ForceAddPlayer( udg_mapInit_playerG_team[2], p )
loop
if j == i then j = j + 1 endif
exitwhen j > 14
if ModuloInteger(j, 3) == 2 then
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( p, Player(j), bj_ALLIANCE_UNALLIED )
endif
set j = j + 1
endloop
else
//call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 15, "fuck's wrong?")
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Map_Inital_Player_Team_Settings takes nothing returns nothing
set gg_trg_Map_Inital_Player_Team_Settings = CreateTrigger( )
call TriggerAddAction( gg_trg_Map_Inital_Player_Team_Settings, function Trig_Map_Inital_Player_Team_Settings_Actions )
endfunction