User Tools

Site Tools


put_entity

This is an old revision of the document!


Put Entity


Instantly positions an object or character onto the specified tile.

Signature:

put_entity(entity, tile_id)
ArgumentDescriptionTypeRequired
entityEntity to reposition.EntityYes
tile_idID of the destination tile.StringYes

If you are changing the player's position, you can alternatively use the more convenient Put Player function which also lets you specify the player's direction.

Example:

put_entity(entity["slippery_chest"], "chest_destination")

Results: The entity with an ID of “slippery_chest” is immediately repositioned onto the tile with an ID of “chest_destination”.

Use the Put Entity function to move objects around the scene, for example to create the illusion that the player has pushed an obstacle out of their way.


Editor Node:

Visual Demo:

put_entity.1595522278.txt.gz · Last modified: 2020/07/23 09:37 by justin