ScriptObject
One of your objects, placed with objects.create.
Definition
Section titled “Definition”type ScriptObject = Readonly<{ id: number; model: number; position: Vector3; rotationDegrees: Vector3; interior: number; virtualWorld: number; interactive: boolean; scale: number; motion: ScriptObjectMotion | null; attachment: ScriptObjectAttachment | null; materials: readonly ScriptObjectMaterial[];}>;
type ScriptObjectSettings = { model: number; position: Vector3; rotationDegrees?: Vector3; interior?: number; virtualWorld?: number; interactive?: boolean; scale?: number;};Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id |
number |
The object’s ID. |
model |
number |
Its GTA:SA model. |
position |
Vector3 |
World position at the last update. Use motion for the endpoints of a move in progress. |
rotationDegrees |
Vector3 |
Rotation at the last update, about x, y and z in degrees. |
interior |
number |
The interior: 0 outside, 1 to 18 an interior’s, 13 every interior. |
virtualWorld |
number |
The virtual world it is in, or -1 (virtualWorlds.every) for every one. |
interactive |
boolean |
Whether players can use it (Enter). |
scale |
number |
Visual scale. |
motion |
ScriptObjectMotion | null |
The active move or turn. |
attachment |
ScriptObjectAttachment | null |
The current attachment. |
materials |
readonly ScriptObjectMaterial[] |
Active material overrides. |
Related
Section titled “Related”objects.create: the settings,ScriptObjectSettings