system
September 13, 2020, 1:23pm
1
Attention
Topic was automatically imported from the old Question2Answer platform.
Asked By
anbarasu chinna
I have added a OGG kind sound in my game. It will play once when user Tap on mobile screen. But the problem is OGG sound gets looped.
Here is the code to play the sound
$AudioStreamPlayer2D.playing = true
How to avoid looping. I want the sound to be played once.
system
September 13, 2020, 1:57pm
2
Reply From:
Scavex
In the file system window where you usually get a view of all your files, you just have to select the .ogg file and then go above to the Scene View. On it’s right you will see import Tab. Click on it and then there will be many options, uncheck the Loop
and click on Reimport
. This should fix your problem.
Exactly what am looking for
anbarasu chinna | 2020-09-13 14:21
system
September 13, 2020, 2:00pm
3
Reply From:
jgodfrey
You probably imported the sound with Loop
turned on. To fix it…
Select the sound file in the FileSystem
tab in Godot
Go to the Import
tab (next to the Scene
tab)
Uncheck Loop
Click the Reimport
button
Exactly what am looking for
anbarasu chinna | 2020-09-13 14:20
Oh my gosh thank you so much. So simple!!! I owe you a coffee, jgodfrey.
Ohhhh my, thank yo sooooooo much hahahaha
piponazo19 | 2022-03-24 05:54