Godot - How to set the AudioStreamPlayer to switch between tracks

by Kennichi Nitta   Last Updated January 11, 2019 12:13 PM

Conditional Music Playback

What's important here is that I know how to switch the track that's being played back to another if some condition is met in the scene. If possible I also want to know where to store the other tracks.

I looked into the documentation and have yet to find a solution that allows me to for example:

  • set the new track's file path and play it or...
  • store the track names in maybe an array and set them for playback in the script. (still requires something to change the currently playing track)

How do I switch the tracks based on any condition?

Tags : audio music godot

Related Questions

Where to purchase multitrack music loops?

Updated November 01, 2017 20:13 PM

How to make simple audios tracks?

Updated November 06, 2016 08:05 AM

FramiTracker or FL Studio for Game Music

Updated August 08, 2018 22:13 PM

How to change music from room to room?

Updated June 03, 2019 11:13 AM