scope TeamSetup initializer onInit
private function onInit takes nothing returns nothing
local integer i = 0
call BJDebugMsg("This is how we do it!")
loop
if IsPlayerAlly(Player(i), Player(0)) then
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_SHARED_VISION, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_HELP_RESPONSE, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_HELP_REQUEST, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_SHARED_XP, true )
call SetPlayerAlliance(Player(i),Player(13), ALLIANCE_SHARED_SPELLS, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_SHARED_VISION, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_HELP_RESPONSE, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_HELP_REQUEST, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_SHARED_XP, true )
call SetPlayerAlliance(Player(13),Player(i), ALLIANCE_SHARED_SPELLS, true )
call BJDebugMsg("Player " + I2S(i) + " allied!")
endif
if IsPlayerAlly(Player(i), Player(1)) then
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_SHARED_VISION, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_HELP_RESPONSE, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_HELP_REQUEST, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_SHARED_XP, true )
call SetPlayerAlliance(Player(i),Player(14), ALLIANCE_SHARED_SPELLS, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_SHARED_VISION, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_HELP_RESPONSE, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_HELP_REQUEST, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_PASSIVE, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_SHARED_XP, true )
call SetPlayerAlliance(Player(14),Player(i), ALLIANCE_SHARED_SPELLS, true )
call BJDebugMsg("Player " + I2S(i) + " allied!")
endif
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
endfunction
endscope