Disables the object, making it inactive (dead) in the scene.
Use this in the scene setup, when you need to delete an object from the scene permanently or temporarily.
This is analogous to calling LifeOpcodes.LM_KILL_OBJ life script function later, in a life handler.
The object will not be updated or rendered, but can be still resurrected later by LifeOpcodes.LM_SET_LIFE_POINT_OBJ or LifeOpcodes.LM_ADD_LIFE_POINT_OBJ life script functions.
Returns the current angle of the object around Y in 0-4096 degrees.
Returns the animation id of a 3D object.
Returns the armor value of the object.
Returns the body type of a 3D object.
Returns the bonus quantity of the object.
Returns the entity index of a 3D object.
Returns the hit power of the object.
Returns the id of the object (the index of the object in the scene).
Returns the life points of the object.
Returns true if the life script is present for this object.
Returns true if the move script is present for this object.
Returns the current position of the object in the world.
Array of 3 values representing the position as [x, y, z]
Returns array of 4 values that represent the object info registers When clipping is used, it is clipping information of the object as: [Left, Top, Right, Bottom]. When Move randomly mode is used, the #3 register contains the random interval. When following on actor the #3 register contains the actor ID.
Returns the rotation speed of the object.
LBArchitect shows rotation delay instead. Rotation speed is connected to the delay by the formula:
speed = 50 * 1024 / delay
Returns the sprite ID for a sprite object.
Returns the talk color of the object.
If called, the life script of this object will be handled by Ida. It is still possible to execute the vanilla life script of the object afterwards (controlled by the callback return value).
Optionalcallback: (objectId: number) => boolean | voidThe user function containing custom life commands for this object, will be called each frame. This function should return true if the vanilla life script should be executed afterwards, false or nothing otherwise. If callback is not specified, no life scripts will be executed for this object.
If called, the move script of this object will be handled by Ida, so it will enable Ida coroutines for this object. This action is irreversible in the context of the current loaded scene. No more vanilla move script will be executed for this object until the scene is reloaded.
Returns true if the object is facing the specified zone direction. This should usually be used with the sceneric zones, when you already checked the player is inside the zone.
The ID of the zone to check.
Optionaldirection: ZoneDirectionThe direction to check against this zone. If not specified or 0, it checks if the object is facing the direction from Info2 register of the zone.
Sets the angle of the object around Y in 0-4096 degrees.
The angle value.
Sets the animation id of a 3D object.
The animation id. You can view all the animation ids for a particular 3D entity, using Ida/Samples/animations sample.
Sets the armor value of the object.
The armor value.
Sets the body type of a 3D object.
The body id. You can view all the body ids for a particular 3D entity, using Ida/Samples/animations sample.
Sets the bonus quantity of the object.
The number of bonus items for the object.
Sets the control mode of the object. Might have no effect for some objects, for example, the hero, when set through the scene setup. In this case should be set through the life script, LifeOpcodes.LM_SET_CONTROL.
Sets the entity index of a 3D object.
The 3D entity id. You can view all the entity ids in Ida/srcjs/architect/entities.md file.
Sets the hit power of the object.
The hit power value.
Sets the life points of the object.
The life points value.
Sets the position of the object in the world.
Array of 3 numbers: [x, y, z].
Sets the object info registers.
Array of 4 numbers: [Info, Info1, Info2, Info3].
Sets the rotation speed of the object.
The rotation speed value should be an integer from -32768 to 32767.
LBArchitect shows rotation delay instead. Rotation speed is connected to the delay by the formula:
speed = 50 * 1024 / delay
Sets the sprite ID for a sprite object.
The sprite ID value.
Sets the talk color of the object.
The talk color value from 0 to 15.
Interface representing a game object (actor) in the scene.
The player, NPCs, but also doors, interractable items, anything that can move or interract in the 3D space of the scene - those are all game objects.
The setters in the object can only be used in the scene setup phase (see SceneEvents.afterLoadScene event).