(Official) LUA Scripting Documentation
add_entity
Add (spawn) a single entity.
Spec:
add_entity(
double x,
double y,
double z,
double duration,
double velocity_x,
double velocity_y,
double velocity_z,
double scale,
string com_pack,
string com_name,
bool is_face_forward,
bool is_collidable,
double draw_pos_offset_x,
double draw_pos_offset_y,
double draw_pos_offset_z,
double draw_rot_offset_y)
Parameters
x
: The x component of the world position of the entityy
: The y component of the world position of the entityz
: The z component of the world position of the entityduration
: The duration (lifetime) of the entity in seconds.velocity_x
: The x component of the velocity of the entityvelocity_y
: The y component of the velocity of the entityvelocity_z
: The z component of the velocity of the entityscale
: The relative size of the entity blocks. 1 = normal world block sizecom_pack
: The name of the component packcom_name
: The name of the componentis_face_forward
: The entity will face the direction of it’s movement (velocity)is_collidable
: The entity will collide with actors (Players and NPCs)draw_pos_offset_x
: Draw position offsetdraw_pos_offset_y
: Draw position offsetdraw_pos_offset_z
: Draw position offsetdraw_rot_offset_y
: Draw rotation offset for the Y axis
Entities will be removed if they move outside the game world
Incomplete
This documentation is incomplete