Name | Type | is_array | initial_value |
AlphaReal | real | No | |
ArcadeChance | integer | No | |
BaseTroopers | group | No | |
Bites | integer | No | |
Class1 | button | No | |
Class2 | button | No | |
Class3 | button | No | |
Class4 | button | No | |
Class5 | button | No | |
Class6 | button | No | |
ClassPick | dialog | No | |
CleanBaseGroup | group | No | |
DayIncomingTimer | timer | No | |
DayIncomingTimerWind | timerdialog | No | |
Droid | group | No | |
Effect1 | lightning | No | |
Effect2 | lightning | No | |
Engineer | unit | No | |
EvacuationUnits | group | No | |
FacelessHit | force | No | |
FleshPoint | location | No | |
FleshRandom | integer | No | |
HelpText | texttag | No | |
HelpText_Copy | texttag | No | |
HelpText_Copy_2 | texttag | No | |
HelpText_Copy_3 | texttag | No | |
InteractChange | integer | No | |
LabGenerator | unit | No | |
Mission1 | quest | No | |
Mission1Units | group | No | |
Mission2 | quest | No | |
Mission3 | quest | No | |
MonsterSpawn | location | No | |
NoMoneyVilla | group | No | |
PlayerCount | integer | No | |
Random | integer | No | |
Random2 | integer | No | |
Random3 | integer | No | |
Random4 | integer | No | |
RandomAdvancement | integer | No | |
RandomBasePoint | location | No | |
RandomMonsterPoint | location | No | |
RandomName | integer | No | |
RandomTravelers | integer | No | |
RandomWeather | integer | No | |
SabotageTarget | unit | No | |
SignAloof | integer | No | |
SignSteal | integer | No | |
Surivors | group | No | |
Survivor1 | unit | No | |
Survivor2 | unit | No | |
Survivor3 | unit | No | |
Survivor4 | unit | No | |
Survivor5 | unit | No | |
Survivor6 | unit | No | |
Survivor7 | unit | No | |
Survivor8 | unit | No | |
SurvivorPlayers | force | No | |
Synthesizer | unit | No | |
Tazed | group | No | |
tempTrigPlayer | player | No | |
TestingTube | unit | No | |
TrackingPlayer | force | No | |
TravelerAgent | unit | No | |
TravelerBurned | unit | No | |
TravelerHunter | unit | No | |
TravelerMecha | unit | No | |
TravelerScient | unit | No | |
TravelerTeach | unit | No | |
VillagerSpawn | location | No | |
VisitorBaseGroup | group | No | |
VisitorChase | unit | No | |
VisitorPlayer | player | No | |
VisitorPlayers | force | No | |
VisitorUnit | unit | No | |
VisitorVillagers | group | No |
function RandomizePlayerColors takes nothing returns nothing
local playercolor array pcolors
local integer i = 0
local playercolor temp
local integer rnd
// assign colors to array
set pcolors[0] = PLAYER_COLOR_RED
set pcolors[1] = PLAYER_COLOR_BLUE
set pcolors[2] = PLAYER_COLOR_CYAN
set pcolors[3] = PLAYER_COLOR_PURPLE
set pcolors[4] = PLAYER_COLOR_YELLOW
set pcolors[5] = PLAYER_COLOR_ORANGE
set pcolors[6] = PLAYER_COLOR_GREEN
set pcolors[7] = PLAYER_COLOR_PINK
loop
exitwhen i == 4
set rnd = GetRandomInt(i,7)
set temp = pcolors[i]
set pcolors[i] = pcolors[rnd]
set pcolors[rnd] = temp
if (GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING) then
call SetPlayerColorBJ(Player(i), pcolors[i] , true)
else
call SetPlayerColorBJ(Player(i), PLAYER_COLOR_LIGHT_GRAY , true)
// if not playing set player color to gray
endif
set i = i+1
endloop
endfunction