Skip to content

Entity

Entity is the common base for world objects. This page covers thrown grenades and active explosion objects. Every property is read-only.

The game world creates and removes network entities: projectiles on throw, explosion areas on detonation, and a planted BridgeCharge after plant completes. The ThrownProjectiles, Explosions, and PlantedBridgeCharges globals query the current registry and wrap matching objects for Lua.

A wrapper does not create an entity or extend its lifetime. A retained object may become unavailable after explosion or despawn; call GetAll() or the specialized query again for a current list. Client values also follow team-visibility rules, while the server reads simulation state directly.

Explosion from an EMP grenade.

Base: Explosion

Base object for all entities in the world.

Property Type Access Description
ID int get Unique entity ID.
IsVisible bool get true if the entity is visible to the local team. When the entity is not visible, all members except Name and ID return undefined values.
Name string get Entity name.
Position Vector3 get Entity position in the world.
TicksSinceLastVisible int get Client only Number of ticks since the entity was last visible.

Base explosion object with common lifetime parameters.

Here, an “explosion” is an active gameplay-effect entity: an instantaneous frag, fire area, sonar, or protective dome. The game system processes damage and other effects; reading the object only observes state that already exists.

Base: Entity

Property Type Access Description
AsEMPGrenadeExplosion EMPGrenadeExplosion get Returns the explosion as EMPGrenadeExplosion, or nil if it is a different explosion type.
AsFragGrenadeExplosion FragGrenadeExplosion get Returns the explosion as FragGrenadeExplosion, or nil if it is a different explosion type.
AsIncendiaryExplosion IncendiaryExplosion get Returns the explosion as IncendiaryExplosion, or nil if it is a different explosion type.
AsPowerShellExplosion PowerShellExplosion get Returns the explosion as PowerShellExplosion, or nil if it is a different explosion type.
AsSonarExplosion SonarExplosion get Returns the explosion as SonarExplosion, or nil if it is a different explosion type.
Instigator Agent get The agent that initiated this Explosion.
IsEMPGrenadeExplosion bool get true if this is an explosion from an EMP grenade.
IsFragGrenadeExplosion bool get true if this is an explosion from a Frag grenade.
IsIncendiaryExplosion bool get true if the explosion is a fire area from an incendiary grenade.
IsPowerShellExplosion bool get true if the explosion is a shield dome.
IsSonarExplosion bool get true if the explosion is a sonar.
ThrowableConfig ConfigItemThrowable get Configuration of the throwable item that created this Explosion. Returns nil if the configuration is unavailable.
ToDespawnTicks int get Remaining number of ticks until the explosion is removed.

Global API for listing explosions.

Explosions:GetAll(): Array<Explosion>

Returns all active grenade explosions on the map.

Returns: Array<Explosion>

Explosions:GetEMPGrenadeExplosions(): Array<EMPGrenadeExplosion>

Returns all EMP grenade explosions (EMPGrenadeExplosion) on the map.

Returns: Array<EMPGrenadeExplosion>

Explosions:GetFragGrenadeExplosions(): Array<FragGrenadeExplosion>

Returns all Frag grenade explosions (FragGrenadeExplosion) on the map.

Returns: Array<FragGrenadeExplosion>

Explosions:GetIncendiaryExplosions(): Array<IncendiaryExplosion>

Returns all active fire areas (IncendiaryExplosion) on the map.

Returns: Array<IncendiaryExplosion>

Explosions:GetPowerShellExplosions(): Array<PowerShellExplosion>

Returns all active protection domes (PowerShellExplosion) on the map.

Returns: Array<PowerShellExplosion>

Explosions:GetSonarExplosions(): Array<SonarExplosion>

Returns all active sonars (SonarExplosion) on the map.

Returns: Array<SonarExplosion>

Explosion from a Frag grenade.

Base: Explosion

Fire from an incendiary grenade.

Base: Explosion

A planted BridgeCharge in the game world.

The object appears after planting a BridgeChargeItem completes and is removed when the corresponding round state ends. It exposes no Lua plant or defuse command.

Base: Entity

In addition to the Entity properties, this object exposes the charge icon.

Property Type Access Description
Icon Texture get Icon of the planted BridgeCharge.

Global API for working with PlantedBridgeCharge.

PlantedBridgeCharges:GetPlanted(): Array<PlantedBridgeCharge>

Returns all planted BridgeCharges. The array can be empty before a charge is planted or after it is removed.

Returns: Array<PlantedBridgeCharge>

A PowerShell dome in the world.

Base: Explosion

Property Type Access Description
ShellDurability number get Current dome durability.
ShellMaxDurability number get Maximum dome durability.

Sonar as an object in the world.

Base: Explosion

Thrown item in flight, such as a grenade.

Projectile physics updates position and velocity. Lua only reads the network entity; SimulateTrajectory() calculates a separate point set and does not interfere with the real flight.

Base: Entity

Property Type Access Description
IsExploded bool get true if the item has already exploded or is no longer active.
ThrowableConfig ConfigItemThrowable get Throwable item configuration. Returns nil if the configuration is unavailable.
ThrownAtTick int get Tick on which the item was thrown.
ThrownBy Agent get The agent who threw the item.
Velocity Vector3 get Current flight velocity.
ThrownProjectile:SimulateTrajectory(): Array<Vector3>

Client only Returns the calculated flight trajectory.

This method does not move or draw anything. It returns a snapshot of calculated points; pass them to LineRenderer:SetPositions() to display a world-space line.

Returns: Array

Global API for working with thrown items in flight.

ThrownProjectiles:GetAll(): Array<ThrownProjectile>

Returns all active thrown items, such as grenades, that have not exploded yet. On the client, also returns grenades that are not visible now but were visible before and continue to have their trajectory predicted.

Returns: Array<ThrownProjectile>

Related types: Array and Vector3.