GetSpawnStat
From the Scripting Manual
function GetSpawnStat(ID: byte; Stat: string): variant; Parameter Info: ID (Byte): Spawn Point ID to get the stat of. Stat (String): See Description for more information. Description: This function will return some information about the specified spawn point (ID).
Stat | Result | Type |
---|---|---|
Active | Spawn active? | Boolean |
Style | Type | Byte |
X | Spawn X | Single |
Y | Spawn Y | Single |
Styles
This is a list of Style types and their descriptions.
Style | Description |
---|---|
0 | Player Spawn |
1 | Alpha Team |
2 | Bravo Team |
3 | Charlie Team |
4 | Delta Team |
5 | Alpha Flag |
6 | Bravo Flag |
7 | Grenade Kit |
8 | Medikit |
9 | Cluster Grenades |
10 | Vest |
11 | Flamer |
12 | Beserker |
13 | Predator |
14 | Point Match Flag |
15 | Rambo Bow |
16 | Stationary Gun |
Examples
var i: byte;
begin
for i := 1 to 254 do //NOTE: This spawn point array goes from 1 to 254, NOT 0 or 255.
if GetSpawnStat(i,'active') = true then begin // Make sure this spawn point is used
if GetSpawnStat(i,'style') = 1 then WriteLn('Spawn ID '+inttostr(i)+' is a Alpha Team spawn point');
if GetSpawnStat(i,'style') = 2 then WriteLn('Spawn ID '+inttostr(i)+' is a Bravo Team spawn point');
if GetSpawnStat(i,'style') = 3 then WriteLn('Spawn ID '+inttostr(i)+' is a Charlie Team spawn point');
if GetSpawnStat(i,'style') = 4 then WriteLn('Spawn ID '+inttostr(i)+' is a Delta Team spawn point');
// All the other style's are for things such as Medical Kit, Predator, Flag, Grenade Kit etc
end;