Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I had problems adding one-time played sound. Can you please show me how to do that?

(3 edits) (+1)

You can use an AudioStreamPlayer node like AudioStreamPlayer2D or AudioStreamPlayer3D.

https://docs.godotengine.org/en/stable/classes/class_audiostreamplayer.html

Or the way I do it is adding a AudioStreamRandomizer resource into a folder (right click > create new > resource and search for AudioStreamRandomizer).  Then drag that into your tree.  It'll give more options like multiple sound files for your SFX and  randomizing the pitch and volume.

And then you call the [node_name].play() function right before your desired action.

(+1)

Thank you very much. When the Jam ends I'm going to update the Game on itch.io .