api.game gives you match / environment / placeable info instead of bomb / hostage. Every getter returns the current value the moment you call it.
Getters
| Call | Returns | What it tells you |
|---|---|---|
isInGame() | boolean | true while you’re in an active match (not the lobby). |
getTeamId() | string | Your team id ("" when none). |
getEnvironmentId() | string | Your current environment/zone id ("" when none). |
getPlaceables() | { PlaceableEntry } | Every tracked placeable in the world right now. |
getPlaceable(id) | PlaceableEntry? | One placeable by its id, or nil. |
Signals
Call:Connect(callback) on these. They get cleaned up when your script unloads.
| Signal | When your callback runs |
|---|---|
onInGameChanged | (inGame): you entered or left a match |
onTeamChanged | (teamId): your team id changed |
onEnvironmentChanged | (environmentId): your environment changed |
onPlaceableAdded | (id, placeable): a placeable appeared |
onPlaceableRemoved | (id, placeable): a placeable was removed |