I have a collectible system in my game, and i want it so the sound for picking up the collectible only can be played once for that layout.
simple , create global variable SoundPlayed , make it 0. When the sound played set the variable to 1. Also set the sound to play only when SoundPlayed is 0.
Develop games in your browser. Powerful, performant & highly capable.
Thanks, didn't think about doing it that way.