The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I am trying to learn how to use visualscript and I encountered a problem and I cannot seem to find a solution:

I have 2 Area2D nodes and if they collide the first Area2D emits a onarea_entered signal. In visualscript, this is a node that can get the other Area2D node that has been collided with. So far this works well.

But now I have a problem: Once the onarea_entered signal is emitted I want to use the argument passed into it (i.e. the other area2D node) and call a method on that node. But I cannot find a way to do this in visualscript. Can someone help?

Visually, here is what I am trying to do:
enter image description here

Just for clarity, the GDscript alternative would be this:

in Engine by (259 points)

Please log in or register to answer this question.

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 Frequently asked questions and 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 [email protected] with your username.