how call method from GDScript with visual script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mohsensd1373

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

:bust_in_silhouette: Reply From: Wakatta

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…

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

enter image description here

Click Add Nodes…

  • 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

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

Wakatta | 2021-03-06 19:38

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

mohsensd1373 | 2021-03-06 23:10