CREATE_ENTITY¶
Description¶
Creates a temporary object specified by object
, data
, x
, and y
near the end of the object list.
Note
If there are too many temporary entities loaded when this function is called, the engine will start overwritting them. Therefore, it's recommended to only use this function for entities that quickly get destroyed or unloaded.
Parameters¶
object
-
The name of the object to create an entity of.
data
-
The data to send to the entity's Create() function.
x
-
The position of the entity on the horizontal axis in world-space.
y
-
The position of the entity on the vertical axis in world-space.
Return Value¶
Returns the data of the created entity using the object's entity struct.
Syntax¶
Examples¶
Note
This is a macro, which is designed to make programming in RSDK easier. The underlying logic is:
The underlying logic should NEVER be used as it's less safe than the macro. This note is here for anyone wishing to learn about the internals or hoping to develop a wrapper for another language that doesn't support macros.