0 votes

Hi. Okay, so I am making an educational version of Pacman, and I put an Area2d on a tile which is pretty much the zone and if the pacman enters the zone, a question will pop up. Once the question is answered the player can continue playing but the problem Im facing is that when my player goes over the zone again, the question pops up again. How can I disable the area2d the second time my player goes over the node?

in Engine by (14 points)

2 Answers

0 votes

Have a counter that increases every time the player passes through the rect. When the counter < 1 you can trigger the question, otherwise ignore the question.

by (148 points)
0 votes

If you are using a signal, connections can be made "one shot", that means that the connection will be cut when fired once.

That option is in the connection window and signal connection parameters.

by (7,898 points)
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 webmaster@godotengine.org with your username.