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:

_on_area_entered(area2d):
    area2d.test_method()
in Engine by (242 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 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.