Skip to content

Introduction

Leopold A-C edited this page Sep 30, 2020 · 7 revisions

What is this Add-On?

The Logic Node Add-On adds a large variety of logic nodes to the UPBGE build of Blender. With these nodes, you will be able to assemble your game logic visually, just like in the Unreal Engine or Armory3D.

How does it work?

Quick explanation

Each logic node houses some lines of python code. That code is executed when the condition for the node is met. If a node has no condition, it is executed each time the sensor logic brick connected to it is active.

A bit more technical explanation

When pressing "Update Code" in the logic node tree editor, a .py file is generated. The file defines a reference class for each node in a particular order so that every node is executed only when all values needed for it are computed. Then, a function is called whenever the connected sensor is active, calling the evaluate() function for each node. This is where the magic happens. The evaluate() function collects all the input values from its sockets before waltzing though the lines of code that make something happen in-game.

Clone this wiki locally