0 votes

hi
i want call function from GDscript another node from this node in visual scripting.
How do I do that?

Godot version latest
in Engine by (15 points)

1 Answer

+1 vote
Best answer

From the function you wish to make the call get the node and use one of that nodes call_method function (call, callv, call_deferred)

Click Add Nodes..
Change

  • Call Mode to Node Path
  • Function to get_node
  • Node Path to the node with the GDscript

enter image description here

Click Add Nodes..
Change

  • Call Mode to Instance
  • Base Type to Object / Node
  • Base Script to the path of the GDscript with the function
  • Function to the function you wish to call

enter image description here

Here i use the override _ready(): func
enter image description here

by (3,034 points)
selected by

I've never actually used Visual scripting before so i may be completely off the mark so feedback welcomed

My problem was solved.
You really explained in full.
Thank you very much.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.