Topic was automatically imported from the old Question2Answer platform.
Asked By
Esbo
Hello! I’m creating a custom visual script node. How can I access in-game scene nodes from the _step function? Whenever I use get_node function I get this error: Parse Error: Method 'get_node' is not declared in the current class.
I’m not familiar with VisualScript but I would say that the proper way to get a scene node is to use the dedicated VisualScriptSceneNode and add a NodePath input port to your VisualScriptCustomNode.
PS: I don’t know if this works, I only know GDScript, but I think this is the direction to follow
OK, I can get NodePath as an input pin, but how can I get node from that path without using get_node?
Esbo | 2019-09-05 21:09
Apparently VisualScriptSceneNode gives directly a node as output.
BraindeadBZH | 2019-09-05 21:22
VisualScriptSceneNode is a visual script node. How can I use it from code?