Lumberyard
Legacy Reference

Entity Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use the following flow graph nodes to control entity behavior and configure related settings.

Attachment node

Used to attach and detach attachments to an entity.

Inputs

Port Type Description
Item Any Entity to be linked
BoneName String Attachment bone
CharacterSlot Integer Host character slot
Attach Any Attach entity attached to the bone
Detach Any Detach entity attached to bone
Hide Any Hide attachment
Unhide Any Show attachment
RotationOffset Vec3 Rotation offset
TranslationOffset Vec3 Translation offset

Outputs

Port Type Description
Attached Any Triggers when entity is attached
Detached Any Triggers when entity is detached

BeamEntity node

Used to beam or teleport objects instantly to any position in the level. When the Beam port is triggered the target entity is moved to the position input on the Position port.

Inputs

Port Type Description
Beam Any Trigger to beam the entity
Position Vec3 Destination location to beam to
Rotation Vec3 Rotation to apply to entity
UseZeroRot Boolean Applies rotation even if it is 0
Scale Vec3 Vector scale value
Memo String Memo to log when position is 0

Outputs

Port Type Description
Done Any Triggers when entity has beamed to another location

BroadcastEvent node

Used to send an event to one or more entities. The entities that will receive this event are specified by inputting a string to the name port. Each entity that has the string that is input there as a part of their name will receive the event set in the event port.

Inputs

Port Type Description
send Any Trigger to send an event
event String Event to be sent
name String Entity to receive the event

CallScriptFunction node

Used to call a script function for the entity.

Inputs

Port Type Description
call Any Calls the function
FunctionName String Script function name
Argument1 - Argument5 Any Function arguments

Outputs

Port Type Description
Success Any Script function was found and called
Failed Any Script function was not found or called

CharAttachmentMaterialParam node

Used to change a material on an attachment in a .cdf file. For example, you can change the material of a character's trousers.

Set Material is the trigger, ForcedMaterial is the full file path to the material (for example: materials/references/basecolors/grey.mtl) and SubMtId is the number of the sub-material.

Inputs

Port Type Description
CharSlot Integer Character slot within the entity
Attachment String Attachment
SetMaterial Any Sets the material
ForcedMaterial String Forcefully set the material
SubMtlId Integer Submaterial ID
Get Any Trigger to get current value
ParamFloat String Float parameter to get or be set
ValueFloat Float Trigger to set value
ParamColor String Color parameter to get or be set
ValueColor Vec3 Sets value color

Outputs

Port Type Description
ValueFloat Float Current floating point value
ValueColor Vec3 Current color value

CheckDistance node

Used to check the distance between the node entity and the entities defined in the input ports.

Inputs

Port Type Description
Check Any Trigger to check distance
MinDistance Float An entity that is nearer this distance will be ignored
MaxDistance Float An entity that is further than this distance will be ignored
Entity1 - Entity16 Any Entity ID values

Outputs

Port Type Description
NearEntity Any Nearest entity
NearEntityDist Float Distance of nearest entity
FarEntity Any Furthest entity
FarEntityDist Float Distance of furthest entity
NoEntInRange Any Triggers when no entities are between MinDistance and MaxDistance

ChildAttach node

Used to attach another entity to its target entity. The child entity will be linked to the target entity until the link is removed. The entity defined in the Child input port is attached to the target entity.

Inputs

Port Type Description
Attach Any Triggers entity attachment
Child Any Child entity to be attached
KeepTransform Boolean Child entity will be kept at the same transformation in world space
DisablePhysics Boolean Disable physics for child entity when attached

ChildDetach node

Used to detach entities from its parent entity. Usually the ChildAttach node has been used before to link the target entity to another entity.

When KeepTransform is set, the entity will keep its transformation in world space when detached. When EnablePhysics is set, physics will be re-enabled again when the entity is detached.

Inputs

Port Type Description
Detach Any Triggers entity detachment
KeepTransform Boolean Child entity will be kept at the same transformation in world space
EnablePhysics Boolean Enable physics for child entity when detached

Damage node

Used to damage the specified entity when the trigger is activated.

Inputs

Port Type Description
Trigger Any Triggers the node
Damage Integer Amount of damage to inflict
DamageRelative Integer Damage inflicted is relative to the health of the entity
Position Vec3 Location damage occurs at

EntitiesInRange node

Used to take the positions of two entities and check if they are in a certain range to each other. Depending on the result of the check the output ports are triggered.

Inputs

Port Type Description
Trigger Any Triggers the node
Entity1 Any Entity 1
Entity2 Any Entity 2
Range Float Distance range to check

Outputs

Port Type Description
InRange Boolean True if entities are in range of each other
False Any Triggers if entities are not in range
True Any Triggers if entities are in range
Distance Float Floating point distance between the two entities
DistVec Vec3 Vector distance between the two entities

EntityId node

Used to output the entity ID number of the specified entity. The node does not need to be triggered as the entity ID never changes.

Inputs

Port Type Description
Activate Any Entity ID

Outputs

Port Type Description
Id Any Outputs the entity ID

EntityInfo node

Used to output the ID, name, class, and archetype of the target entity.

Inputs

Port Type Description
Get Any Gets entity information

Outputs

Port Type Description
Id Any Entity ID
Name String Entity name
Class String Entity class
Archetype String Entity archetype

EntityPool node

Used to prepare an entity from the pool or free it back to the pool.

Inputs

Port Type Description
Prepare Any Brings entity into existence from the pool
Free Any Frees the entity back to the pool

Outputs

Port Type Description
Ready Any Triggers when the entity is prepared and ready
Freed Any Triggers when the entity is freed and returns to the pool
Error Any Triggers when an error occurs

EntityPos node

Handles all position related manipulations of the owner entity. All position information of the specified entity can be read from the output ports.

Unlike the GetPos node, the output ports of this node are triggered whenever one of the target entity properties changes.

Inputs

Port Type Description
Pos Vec3 Entity position
Rotate Vec3 Entity rotation angle in degrees
Scale Vec3 Entity scale
CoordSys Integer Coordinate system used

Outputs

Port Type Description
Pos Vec3 Current entity position
Rotate Vec3 Current entity rotation angle in degrees
Scale Vec3 Current entity scale
FwdDir Vec3 Current entity y-axis position
RightDir Vec3 Current entity x-axis position
UpDir Vec3 Current entity z-axis position

FindEntityByName node

Used to find an entity by name and output the entity ID.

Inputs

Port Type Description
Set Any Start searching for entity
Name String Name of entity to look for

Outputs

Port Type Description
EntityId Any Outputs the entity ID if found

GetBounds node

Used to get and output the bounds.

Inputs

Port Type Description
Get Any Gets the AABB bounding box
CoordSys Integer Coordinate system used

Outputs

Port Type Description
Min Vec3 Minimum position of the AABB
Max Vec3 Maximum position of the AABB

GetEntityExistence node

Used to get an entity's existence.

Inputs

Port Type Description
Get Any Gets entity existence status
EntityId Any Entity ID

Outputs

Port Type Description
Exists Boolean True if the entity exists
True Any Triggers if the entity exists
False Any Triggers if the entity exists

GetPos node

Used to output position information only when the trigger is activated. Similar to the EntityPos node, which triggers the output ports continuously whenever any position information changes.

Inputs

Port Type Description
Get Any Gets entity position
CoordSys Integer Coordinate system used

Outputs

Port Type Description
Pos Vec3 Entity position
Rotate Vec3 Entity rotation
Scale Vec3 Entity scale
FwdDir Vec3 Entity y-axis position
RightDir Vec3 Entity x-axis position
UpDir Vec3 Entity z-axis position

ParentId node

Used to obtain the parentID number of the specified entity.

Outputs

Port Type Description
Parent Id Any Parent entity ID

PropertyGet node

Used to retrieve an entity property value.

Inputs

Port Type Description
Get Any Trigger to get entity property value
Property String Name of property to get
PerArchetype Boolean True if a per archetype property; false if a per instance property

Outputs

Port Type Description
Value Any Outputs property value
Error Any Retrieves property value

PropertySet node

Used to change the entity property value. Will not work with SaveLoad however.

Inputs

Port Type Description
Set Any Sets property value
Property String Name of property to set
Value String Property value to be set
PerArchetype Boolean True if a per archetype property; false if a per instance property

Outputs

Port Type Description
Error Any Any

RemoveEntity node

Used to remove an entity.

Inputs

Port Type Description
Activate Any Triggers the node
Entity Integer Entity to remove

Outputs

Port Type Description
Done Any Triggers when entity has been removed

RenderParams node

Used to set rendering parameters.

Inputs

Port Type Description
Opacity Float Sets entity transparency value

Spawn node

Used to spawn an entity with the specified properties.

Inputs

Port Type Description
Spawn Any Spawns an entity
Class String Entity class
Name String Entity class
Pos Vec3 Entity position
Rot Vec3 Entity rotation
Scale Vec3 Entity scale

Outputs

Port Type Description
Done Any Triggers when entity has completed spawning
Succeeded Any Triggers when entity is spawned
Failed Any Triggers if entity was not spawned

SpawnArchetype node

Used to spawn an archetype entity with the specified properties.

Inputs

Port Type Description
Spawn Any Spawns an entity
Archetype String Archetype entity name
Name String Entity name
Pos Vec3 Entity position
Rot Vec3 Entity rotation angle
Scale Vec3 Entity scale

Outputs

Port Type Description
Done Any Triggers when entity has completed spawning
Succeeded Any Triggers when entity is spawned
Failed Any Triggers if entity was not spawned