Skip to content

Spawn Object

Description

Spawn Object Node The Spawn Object Node attempts to spawn a new dynamic object into the game. It takes an object definition, and if there is enough dynamic object capacity left, will create a new instance of that object definition as a map level dynamic object at the position in map coordinates specified in the X and Y values.

If the operation succeeds, the flow will follow the Success flow, if it fails due to there being insufficient dynamic object slots available, it will follow the Fail flow.

If the spawn operation succeeds, the Spawn Ref port will provide a reference to the spawned object for further modification or recording in a variable. If the spawn fails, this port value is undefined and should not be used.



Ports

Flow In
In order for this node to perform its operation, it must be connected into an active flow using this input port. The flow will ultimately originate at a Trigger node but can come from the Flow Out port of any other flow node.
Success
A node connected to the Success port will be executed in sequence following the successful completion of this node's operation.
Fail
A node connected to the Fail port will be executed in sequence if the operation failed.
X
An integer input port used to provide the X value of the map coordinate.
Y
An integer input port used to provide the Y value of the map coordinate.
Plane
An integer input port used to provide the plane on which the object's sprite will render. See Planes for more information about sprite planes.
Spawn Ref
An object reference output port that provides a reference to the spawned object if the operation succeeded.

Parameters

X
A constant integer value for the X coordinate, used when the X port is not connected.
Y
A constant integer value for the Y coordinate, used when the Y port is not connected.
Plane
A constant integer value for the plane, used when the Plane port is not connected
Object Definition
A dropdown will provide a list of possible object types to choose from to spawn.