C4 Engine
C4 Engine API Documentation

Node::SetConnectedNode

Defined in:  C4Node.h
Sets the connected node with a particular key.
Prototype

void SetConnectedNode(const char *key, Node *node);

Parameters
key The key value of the connector.
node The node to which the connector should be linked. This may be nullptr.
Description
The SetConnectedNode function searches for a connector having a key matching the key parameter and, if such a connector is found, connects it to the node specified by the node parameter. If there is no connector with the matching key and the node is not nullptr, then it is created and connected to the specified node.

If the node parameter is nullptr and a connector with the matching key exists, then the target of the connector is set to the node for which the SetConnectedNode function is called. That is, unconnected connectors loop back to their starting points.
See Also

Node::GetConnectedNode

Node::AddConnector

Node::RemoveConnector