2009-06-15, 22:47:09
Well, it shouldn't be possible to get Tinker through the random trigger, since there is a hard coded list, that does not include the Tinker.
You can check the code yourself:
I also just checked if the comments with the tank names are correct, so there is no problem (Tinker is 'H006').
You can check the code yourself:
Code:
function GetRandomStartTankType takes player P returns integer
local integer Gold = GetPlayerState(P, PLAYER_STATE_RESOURCE_GOLD)
local integer array TankTypes
local integer TankTypesMax
local integer Start
local integer i
//Start game tanks
set TankTypes[0] = 'H01L' //Scout
set TankTypes[1] = 'H00X' //Anti-Grav
set TankTypes[2] = 'H009' //Light Tank
set TankTypes[3] = 'H008' //Helicopter
set TankTypes[4] = 'H007' //Demolisher
set TankTypes[5] = 'H017' //Medivac
//Mid game tanks
set TankTypes[10] = 'H011' //Goblin Shredder
set TankTypes[11] = 'H00R' //Ghost Tank
set TankTypes[12] = 'H012' //Guard
set TankTypes[13] = 'H00C' //Air Ship
set TankTypes[14] = 'H00B' //Thunder Tank
set TankTypes[15] = 'H00D' //Heavy Tank
set TankTypes[16] = 'H00I' //Goblin Tank
//End game tanks
set TankTypes[20] = 'H01R' //Sky Fortress
set TankTypes[21] = 'H00K' //Infernal Robot
set TankTypes[22] = 'H00F' //Demon Tank
set TankTypes[23] = 'H00H' //Frost Robot
set TankTypes[24] = 'H00E' //Sky Tank
set TankTypes[25] = 'H01S' //Hunter
if Gold < 10000 then
set TankTypesMax = 5
set Start = 0
elseif Gold < 30000 then
set TankTypesMax = 6
set Start = 10
else
set TankTypesMax = 5
set Start = 20
endif
set i = GetRandomInt(Start,TankTypesMax+Start)
loop
exitwhen ((TankMeetsTechRequirements(P, TankTypes[i]) == 0) and ((not udg_TankMonopoly) or (not AnyAllyHasTankOfType(P,TankTypes[i]))))
set i = i + 1
if i > (TankTypesMax + Start) then
if Start > 0 then
set Start = Start - 10
if Start < 10 then
set TankTypesMax = 5
elseif Start < 20 then
set TankTypesMax = 6
else
set TankTypesMax = 5
endif
set i = GetRandomInt(Start,TankTypesMax+Start)
else
set i = 0
endif
endif
endloop
return TankTypes[i]
endfunction
I also just checked if the comments with the tank names are correct, so there is no problem (Tinker is 'H006').
This post has been brought to you by Sand - it's everywhere, get used to it.