Forum

still valid: How do I store an action to a variable that can be used by several objects using logic nodes?

11 February 2018 21:44
Any tutorial explaining how do I save lets say move object from point a to b. Store the action so I can refer it to other objects in the same project with logic nodes???

I thought i had it, but i dont. Is there a way with logic nodes that i can have multiple actions stored and just pick an action to certain objects as needed?????
12 February 2018 15:24
Try to use the "Define Function" and "Call Function" nodes.
When I was preparing the example, I found a bug in "Transform Object" node. So if you will be using this node, you should wait for the next release or apply the patch.
Alexander (Blend4Web Team)
twitter
13 February 2018 06:16
OMG this is soo awesome!!!! Thank you so much Alexander!!! Thank you !!!

May I ask….what is the trouble with "transform object"???? because my scene is all working awesome but I was going to write you about that:
my problem is once setting up the object to move one step to the left when object is clicked, it works great ONLY AFTER THE VERY FIRST CLICK….because when one clicks it for the first time it jumps very far…then it starts to work as it should (the way i set it up). Is this what is going on???? no matter what I do (ctrl+a to reset location, rotation and scale, object to origin, etc).
It always goes far, so then to work well after the first click.
If thats the case where do I apply the patch?? i will look online to find out…you have done enough for me.

Thank you so much!!
13 February 2018 11:34
May I ask….what is the trouble with "transform object"???? because my scene is all working awesome but I was going to write you about that:

"transform object" causes crash if it is called in "Define Function" subtree and uses variables as parameters.

The patch should be applied to src/intern/logic_nodes.js. Move the line tagged with "-" to the place tagged with "+".
Alexander (Blend4Web Team)
twitter
13 February 2018 16:54
Can i open this from inside blender under scripting?
13 February 2018 16:56
You can use any text editor.
Alexander (Blend4Web Team)
twitter
 
Please register or log in to leave a reply.