0 votes

Hello,

i have some code in the _input(event) function which triggers a "change of direction" of the player when i click/touch anywhere on the screen.
Now i also have a connected TextureButton-Signal "pressed" to call an item-functionality.
Problem is now that when i want use the item (press button) i also change the direction, but i don't want that to happen. ;)

Is there a way that the "pressed"-signal of the TextureButton does not trigger the _input(event) function?

What i've tried and works somehow is that i abort the rest of the functionality in _input(event) when the event is in position of the TextureButton. (both event-types are unfortunately "InputEventMouseButton" when clicking anywhere on the screen or pressing Button)
Is there a cleaner way of doing this?

Thank you in advance!

in Engine by (39 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.