Instructions/Get Entity At

From Desynced Wiki


Get Entity At
     
     Gets the best matching entity at a coordinate
Lua ID get_entity_at
Category Math
Icon Power.png
Argument One: Type Input
Argument One: Name Coordinate
Argument One: Description Coordinate to get Entity from
Argument One: Data Type coord_num
Argument Two: Type Output
Argument Two: Name Result



Description[edit | edit source]

Gets an entity that is at the specified coordinate.

Uses[edit | edit source]

Used for capturing which entity exists on a coordinate.

Effectively the inverse of Get Location, which gets a coordinate based on an entity.

Could use to check if there is an entity at a coordinate you were going to build a building on, ie, to check if a building is already there.

Similar Instructions[edit | edit source]

Get Location