Logic node property math


#1

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


#2

Something like this should work:


#3

looks good thanks !!


#4

what is the function node called?


#5

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.


#6

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


#7

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.


#8

that will be great and helpfull


#9

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:


A case for improved animation control when using logic nodes
#10

how do i integrate this patch file to my 0.5 build


#11

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


#12

i have git installed


#13

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


#14

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.


#15

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


#16

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.


#17

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


#18

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


#19

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


#20

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.


A case for improved animation control when using logic nodes