Skip to content
M2O Scripting APIScripting reference
Runtime classServer APIGenerated

Fire

Defined in: server/api.d.ts:1926

Replicated burning volume that damages players and pedestrians standing in it.

new Fire(id): Fire

Defined in: server/api.d.ts:1931

Creates a script wrapper for an existing fire with this ID; use Fire.create() to light one.

number

Network entity identifier.

Fire

Entity.constructor

destroy(): void

Defined in: server/api.d.ts:1962

Puts this fire out and removes it from every client.

void


setEnabled(enabled): void

Defined in: server/api.d.ts:1986

Sets whether this fire is currently burning.

boolean

True to burn; false to stop burning without destroying the fire.

void


setIntensity(intensity): void

Defined in: server/api.d.ts:1974

Sets how fiercely this fire burns whoever stands in it.

number

Percent of a victim’s maximum health burned away per second, from 0 to 100.

void


setRadius(radius): void

Defined in: server/api.d.ts:1968

Sets how far this fire reaches.

number

Burning radius in world units; must be greater than 0 and at most 100.

void


setVirtualWorld(world): void

Defined in: server/api.d.ts:4154

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


setVisible(visible): void

Defined in: server/api.d.ts:1980

Sets whether this fire is drawn and heard.

boolean

True for flames and sound; false for an invisible, silent damage zone.

void


setVisibleTo(player): void

Defined in: server/api.d.ts:4160

Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


toString(): string

Defined in: server/api.d.ts:1957

Returns a readable representation of this fire.

string

The fire’s ID and shape formatted for logging or debugging.

Entity.toString


static create(x, y, z, radius?, intensity?, virtualWorld?): Fire

Defined in: server/api.d.ts:1998

Lights a fire that burns until it is destroyed.

number

World-space X coordinate of the fire’s centre.

number

World-space Y coordinate of the fire’s centre.

number

World-space Z coordinate of the fire’s centre.

number

Optional burning radius in world units; defaults to 3.

number

Optional percent of a victim’s maximum health burned away per second; defaults to 8, what a molotov pool burns at.

number

Optional virtual-world ID used for visibility filtering.

Fire

The newly created fire handle.


static extinguishAll(): number

Defined in: server/api.d.ts:2004

Puts out every fire in the world.

number

The number of fires that were put out.


static extinguishInRadius(x, y, z, radius): number

Defined in: server/api.d.ts:2014

Puts out every fire whose centre lies inside the given sphere.

number

World-space X coordinate of the area’s centre.

number

World-space Y coordinate of the area’s centre.

number

World-space Z coordinate of the area’s centre.

number

Radius of the area to clear, in world units.

number

The number of fires that were put out.

readonly enabled: boolean

Defined in: server/api.d.ts:1951

Whether the fire is currently burning.


readonly id: number

Defined in: server/api.d.ts:4122

Immutable network entity identifier.

Entity.id


readonly intensity: number

Defined in: server/api.d.ts:1941

Percent of a victim’s maximum health burned away per second.


position: Vector3

Defined in: server/api.d.ts:4132

Authoritative world-space position; assignment forces replicated state.

Entity.position


readonly radius: number

Defined in: server/api.d.ts:1936

Burning radius in world units.


rotation: Vector3 | Quaternion

Defined in: server/api.d.ts:4137

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.

Entity.rotation


readonly state: StateBag

Defined in: server/api.d.ts:4142

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.

Entity.state


readonly virtualWorld: number

Defined in: server/api.d.ts:4127

Current virtual-world identifier.

Entity.virtualWorld


readonly visible: boolean

Defined in: server/api.d.ts:1946

Whether flames and sound are drawn.