TPG.Maps.GetSpawn(teamId)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
A team's spawn as written in the map config. This is the authored spawn, not the one in play: tpg.rounds.Setup swaps the two sides each round and publishes the result to TPG.State. To find out where a team actually spawns this round, use tpg.state.GetSpawn. Note the fallback is Vector(0, 0, 0), never nil, so a missing spawn reads as the map origin -- which is truthy, and on most maps is inside the world or under it. That is an out-of-world death god mode does not stop. tpg.state.GetSpawn exists to reject exactly this value; do not paper over a missing spawn by calling here instead.
Parameters
| Name | Type | Description |
|---|---|---|
teamId | number | TEAM_GREEN or TEAM_RED. |
Returns
| Type | Description |
|---|---|
Vector | The authored spawn, or the map origin if there isn't one. |
Examples
No examples available.
Used In
No usages found in the codebase.