EntityPosition

Family: Studio · One form

What it does

Moves the scene entity with this id or name to a new position.

Syntax

EntityPosition(entity string, x float, y float, z float)

Parameters

NameTypeMeaning
entitystringThe entity's id, name or tag. It must match exactly one entity.
xfloatThe new x coordinate.
yfloatThe new y coordinate.
zfloatThe new z coordinate.

Every form returns

nothing

Good to know

  • When the name matches no entity or several, nothing moves and one warning is written to the console, once per name.
  • An entity with a physics body has its body moved along with it.

Example · generated

EntityPosition("value", 100.0, 120.0, 100.0)DO  Sync()LOOP

EntityPosition is called with values of the types its signature asks for. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

133 commands in Studio