to preload multiply audio files:
Preload (by name): "explosion1"&"explosion2"&"explosion3"&"explosion4"
is that right?
and how do i play this sounds randomly?
No. You are trying to preload a sound called "explosion1explosion2explosion3explosion4".
Just load each individually.
To play: Play by name: "explosion"&int(random(1,5))
No. You are trying to preload a sound called "explosion1explosion2explosion3explosion4". Just load each individually. To play: Play by name: "explosion"&int(random(1,5))
oh, i get it
but what about the 'choose' to play random sounds? works fine?
'choose' would also work.
what's the best way to use preload?
with 'on start of layout'?
Yes, then wait for 'All preloads complete' with a 'Trigger once' to toggle a variable that flags that the sounds can be played (if that is relevant).
Develop games in your browser. Powerful, performant & highly capable.
great
tnks