Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
Global objectClient APIGenerated

LocalObjects

const LocalObjects: object

Defined in: client/api.d.ts:588

Objects only the local player sees: the server and the other players never learn of them. Each stays in the cell or worldspace the local player was in when it was created, and shows again on coming back there. The resource that created one owns it: it is removed once that resource stops, and every one on disconnect.

create(form, placement, onLoad?): number

Places an object in the local player’s cell or worldspace; it appears over the next frames. The object’s ID, or 0 when the form is unknown or not scenery, or 512 objects already exist.

string | number

The form ID of scenery: a static, movable static, static collection, tree or light. Nothing that can be taken, looted or activated. Editor IDs are not accepted: the game drops them for these types once loaded.

World units, and radians about the X, Y and Z axes; yaw 0 faces +Y, clockwise.

number

number

number

number

number

number

(id) => void

Called each time the object’s 3D is loaded, the first time included. Not called once this resource stops.

number

exists(id): boolean

Whether the object still exists: not removed, not refused by the game, and its resource still running.

number

From create.

boolean

getPose(id): { pitch: number; roll: number; x: number; y: number; yaw: number; z: number; } | null

Where an object stands and how it is turned, as it was last placed or moved: world units and radians. Null when there is no such object.

number

From create.

{ pitch: number; roll: number; x: number; y: number; yaw: number; z: number; } | null

remove(id): boolean

Removes an object. False when there is no such object.

number

From create.

boolean

setPosition(id, x, y, z): boolean

Moves an object within its cell or worldspace. False when there is no such object.

number

From create.

number

World units.

number

World units.

number

World units.

boolean

setRotation(id, pitch, roll, yaw): boolean

Turns an object. False when there is no such object.

number

From create.

number

Radians about X.

number

Radians about Y.

number

Radians about Z.

boolean