function GetForceAtEnum takes nothing returns nothing
if (udg_GFA_index == udg_GFA_search) then
set udg_GFA_player = GetEnumPlayer()
endif
set udg_GFA_index = udg_GFA_index + 1
endfunction
function GetForceAt takes force whichForce,integer index returns player
set udg_GFA_search = index
set udg_GFA_index = 0
set udg_GFA_player = null
call ForForce(whichForce,function GetForceAtEnum)
return udg_GFA_player
endfunction
function MeleeStartingResourcesForPickedEnum takes nothing returns nothing
local player p = GetEnumPlayer()
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,bj_MELEE_STARTING_GOLD_V1)
call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,bj_MELEE_STARTING_LUMBER_V1)
endfunction
function MeleeStartingResourcesForPicked takes nothing returns nothing
call ForForce(udg_Picked,function MeleeStartingResourcesForPickedEnum)
endfunction
function MeleeStartingUnitsForPickedEnum takes nothing returns nothing
local player indexPlayer = GetEnumPlayer()
local location indexStartLoc = GetStartLocationLoc(GetPlayerStartLocation(indexPlayer))
local race indexRace = GetPlayerRace(indexPlayer)
if (indexRace == RACE_HUMAN) then
call MeleeStartingUnitsHuman(indexPlayer,indexStartLoc,true,true,true)
elseif (indexRace == RACE_ORC) then
call MeleeStartingUnitsOrc(indexPlayer,indexStartLoc,true,true,true)
elseif (indexRace == RACE_UNDEAD) then
call MeleeStartingUnitsUndead(indexPlayer,indexStartLoc,true,true,true)
elseif (indexRace == RACE_NIGHTELF) then
call MeleeStartingUnitsNightElf(indexPlayer,indexStartLoc,true,true,true)
else
call MeleeStartingUnitsUnknownRace(indexPlayer,indexStartLoc,true,true,true)
endif
endfunction
function MeleeStartingUnitsForPicked takes nothing returns nothing
call Preloader("scripts\\SharedMelee.pld")
call ForForce(udg_Picked,function MeleeStartingUnitsForPickedEnum)
endfunction
Name | Type | is_array | initial_value |
Buttons | button | Yes | |
Dialog | dialog | No | |
Dialogs | dialog | Yes | |
GFA_index | integer | No | 0 |
GFA_player | player | No | |
GFA_search | integer | No | 0 |
Picked | force | No | |
PlayerCount | integer | Yes | 0 |
Players | player | Yes | |
PollTime | real | No | 5.00 |
PollTimer | timer | No | |
TeamCount | integer | No | 0 |
Votes | integer | Yes |