Logic node property math

am using the logic node to change a text label UI in real time
so am trying to add 1 to the value of that property but i can’t find any node to do soo

Something like this should work:


looks good thanks !!

what is the function node called?

That one’s actually only in the git version of Armory at the moment. I think you might be able to use events nodes to do that without the function node. :thinking: Or any other event like a button press or something.

yea i know but the function node will come really handy what is the difference between the git versio and the build ?

The git version is just the very latest version. I just added the function nodes like a couple weeks ago. Using the git version can be messy and frustrating because everything is changing and sometimes breaking all of the time. I can give you a patch just for the functions if you want.

1 Like

that will be great and helpfull

1 Like

OK, I think this should work. :crossed_fingers: I’m pretty sure this is based off of the Armory 0.5 commit and should add the function nodes. I’m not 100% sure that I got the 0.5 release commit right so there might be conflicts. Tell me if it works. :smiley:


how do i integrate this patch file to my 0.5 build

I’m not 100% sure, actually. I rarely ever do this. Do you have git installed? I’m going to check the git manpage.

i have git installed

OK I think I may have formatted the patch wrong. One second.

OK I updated the Gist with a different patch. To apply it, you should be able to navigate to the armsdk/armory folder and run git apply 0001-Add-Functions-and-Function-Calls-to-Logic-Nodes.patch.

It warns about some whitespace issues, but it should exit successfully.

1 Like

am geting this error and the function node is not showing in armory
error: Sources/armory/logicnode/CallFunctionNode.hx: No such file or directory
warning: blender/arm/make_logic.py has type 100644, expected 100755

You could try adding CallFunctionNode.hx ( notice the link ) where it says it is missing and running chmod 755 blender/arm/make_logic.py maybe ( you’re on linux right? You may not need to do the chmod because it only has a warning. ). I’m not sure exactly what went wrong. :man_shrugging: As long as it updated the rest of the files hopefully that will fix it.

1 Like

i got the function node working thanks for everything @zicklag
i will make sure to mention you in my game Thanks XD :slight_smile:

1 Like

Awesome! I’m so glad it worked! :smiley:

1 Like

by the way i simplified the script and removed the concatenate string node and canvas set from function damage

and replace on int for on update

Yeah, that makes sense. :slight_smile: I over-complicated it by just quickly refactoring something I was working on.

Oh, BTW here is a screenshot example on how to call and make functions with the new nodes:

The Call Function node takes any kind of object, probably a Haxe or node trait. And lets you call the given function with arguments.

The Function and Function Output nodes let you create functions in node trees that can be called from other nodes ( using the Call Function node) and even from Haxe traits.

1 Like