Sandbox 2 Manual
ContentsIndexHome
PreviousUpNext
Flow-Graph node composition

Flow-Graph node composition

 

 

Introduction

 

A node is the representation of an entity or an action inside the Flow-Graph. 

There are two categories of nodes: Entity nodes and component nodes. An entity node can do everything that a normal entity can do, only that its behaviour is controlled through the graph it is used in. 

Component nodes are nodes which can perform special functions, but are not related directly to any entity. Most component nodes however use specific entities to perform their behaviour 

Ports

The layout of component and entity nodes is similar. A node consists of two sides, an input and an output side. The information transfer of the nodes is handled through so called ports. Ports can send out or receive information. 

On the left side of a node you find the input ports used to connect incoming links. Links from other nodes are connected into these ports. The ports on the right side of the node are called output ports and are activated depending on the behaviour of the node. 

Ports are visualized as small arrows on both sides of the nodes. Ports can have different data types, which can be determined by the colour it has. A port can have one of six different types: 

Any

Unspecified data type. Any input can be fed into this port. 

Boolean

A Boolean value can either be true or false. 

Integer

An integer is a whole number that can be either positive or negative. 

Float

A floating point value data type. 

Vec3

A data type consisting of three float values, representing a vector. 

It is used to store positions, angles or colour values.

String

A string is an array of characters used to store text. 

Values whose type doesn’t match the input port data type will be automatically converted to match the type of the port connected to, if possible. Any output port can be connected to any input port, no matter what type. A integer with the value ‘1‘can be fed in a Boolean input port for example and will be converted to a ‘true’ to match the data type of the port. 

For some component nodes there is a special input port at the top of the entity which is used to set the target entity of the node. 


Entity nodes

Entity nodes are representations of entities in the level. The ports on the nodes are defined in the LUA script and call events in the entity or are activated from within to output something. 

Component nodes

Component nodes are abstract nodes which perform a specific behaviour. Component nodes can have a target entity set to perform actions on. 

Links

Links are used to connect ports and transfer information between them. The length or the shape of a link is not important, since the signal is always transferred immediately. When any of the nodes connected with a link are moved, the link will automatically adjust itself. Links are created by dragging and dropping with the mouse between input and output ports. Links can be deleted by unplugging them from the output port or using the link context menu. 


Colours

The ports of a node have different colours that help determining the datatype provided or accepted by the port. There are the following colours: 

 

Green 
Any 
Red 
Integer 
Blue 
Boolean 
White 
Float 
Turquoise 
String 
Purple 
Vec3 
Copyright © 2008 Crytek GmbH. All rights reserved.