0 votes

I'm trying to play a 'hover' sound when the mouse goes over a TextureButton, but whenever I try, and I load the game, there's no sound, and the game is unresponsive. Here's what I've got:

extends TextureButton

func _ready():

func _input(event):
    if self.is_hovered():

I've tried putting the conditions in through the SamplePlayer, but still nothing. I've also tried with a fixed process.

in Engine by (12 points)

1 Answer

+1 vote

Try with the mouse_enter signal:

extends TextureButton

func _ready():
    connect("mouse_enter", self, "_mouse_enter")

func _mouse_enter():
by (29,092 points)

Still having the same issue with the game not responding, and no sound plays. Thanks for answering, though! Hopefully this can be figured out. :)

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.