how to make that traks are randomly chosen each time the player plays an online game
In short, you would have to make an array in GameState perhaps, where you would have the available music tracks in. When the game starts, you would pick a random index from the music track array in GameState. When the currently playing music ends, you would repeat this (pick another random music track from that array). I suggest you put the playing music in an AudioComponent so you can adjust volume, add events when the music ends (so that you can switch to another random music).
Feel free to ask more specific questions if you need to.
answered Dec 19 '18 at 12:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here