Audio won't play is there a fix?

PirateNinja GamesPirateNinja Games Posts: 4Member

Audio won't play when a button is focused and will only play if the button(s) function doesn't work

Ex: I have a "play" button. when the button is hovered it should play the node "AudioStreamer2D" as "SelectSFX" it won't play unless I intentionally break the function.

Best Answer

  • moaaaamoaaaa Posts: 18
    edited March 28 Accepted Answer

    if i understand you want to play stream when button is focused
    in gdscript it's

    func _on_Button_mouse_entered():
        get_node("AudioStreamPlayer2D").play()
    

Answers

  • moaaaamoaaaa Posts: 18Member
    edited March 28 Accepted Answer

    if i understand you want to play stream when button is focused
    in gdscript it's

    func _on_Button_mouse_entered():
        get_node("AudioStreamPlayer2D").play()
    
  • PirateNinja GamesPirateNinja Games Posts: 4Member

    Thank you

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file