Communication between objects

Oh, cool. I wasn’t aware that anybody had done something like that before. I just finished my setup yesterday. It looks like it is a bit different from yours.

Calling a Function:
image

Defining a function:
image

I repurposed the Call Haxe Function node as a Call Function node and added dynamic number of arguments. The more special part is that the Function and Function Output nodes actually compile to functions in the LogicTree trait. That means that functions defined with nodes and Haxe can be called from either; there is no barrier between the two. It wasn’t as simple as writing new nodes, I had to modify the node compiler a little bit to get the Function and Function Output nodes to work right, but I think the result is awesome. :slight_smile: It adds a seamless way to communicate between objects though traits, regardless of whether or not they are Node or Haxe traits.

I’m going to review my code a little bit more and then submit a PR for Armory. Tell me if you have any suggestions.

3 Likes