Connection Pins

Connection pins connect nodes together to supply data or initiate triggers.

There are two types of connection pins, Execution, and Data.

  • These are represented on either side of each node by diamonds and circles.

    • Pins on the left side are ALWAYS input.

    • Pins on the right side are ALWAYS output.

  • Execution and data ALWAYS flow left to right by virtue of pin connections.

    • The placement of the nodes relative to each other does not matter, only the connected pins.

  • Diamonds will always be execution pins, and all data pins are circles.

    • Nodes that have more than one execution output, like Loops, the Branch node, etc., use circles for their execution outputs.

Execution Pins

Execution Pins define the flow of logic within a node graph. Each node within the chain is connected sequentially using the execution pins.

  • Nodes with no input Execution Pin are Event Nodes, which are the same as event listeners in other programming paradigms.

    • Event nodes can be placed and not connected to anything without causing node graph build issues in Play Mode.

  • Nodes with an input Execution Pin require it to be connected for them to execute, they cannot do anything on their own.

    • Any Execution node with an input Execution pin not connected will trigger a failed node graph build in Play Mode, though other code that is not affected can still potentially run just fine.

Above, an event's output execution pin is connected to a node input execution pin.

Not all execution pins may be represented by diamonds. Due to engine limitations, some execution pins are circles instead.

Data Pins

Data Pins allow nodes to receive and provide data of one of the Data Types available to us in Forge.

  • Some Data Nodes, like Get All Players, do not have input Data Pins.

  • Many Data Nodes that have input pins can have the values of those inputs set manually in the Node Properties or programmatically, meaning you can set the value of the pin directly without plugging anything in to it, or you can connect a data source that could potentially give different information each time the connection is checked for data.

  • Some Data Nodes, like the Identifier and Number nodes in the Variables - Basic section, only have outputs, but the value of the output must be manually set in the Node Properties.

  • Data Nodes will provide fresh data each time connections to them are accessed.

    • This means that you can use a node like Random, which provides a random number based on parameters, in each iteration of a loop and it will provide a new value each time.

    • This can be problematic in some instances, so it is important to make sure to lock data in place where necessary.

      • This can be as simple as saving it in a variable that only updates when you want it to instead of reading it dynamically from the current game state, or passing an object or number into a custom event and using the output pins on the custom event, as they will not 'reach back' through their triggering node to get new data and will only work with what they were provided when called.

Above, the player is being received by the Print Player to Killfeed node from the On Player Mark Event.

Get All Players provides an Object List of all players currently in the game.

Contributors AgentZero Captain Punch

Last updated