How can i play Song randomly ?

Get help using Construct 2

Post » Wed May 14, 2014 1:55 pm

I have 5 Song.
If i click on "start" button i want to start play randomly one song of them. :o

Thank you!
B
4
Posts: 29
Reputation: 262

Post » Wed May 14, 2014 3:27 pm

hi,
something like this:
play song by name>choose(song1, song2, song3, song4, song5)
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
35
S
13
G
7
Posts: 363
Reputation: 7,283

Post » Wed May 14, 2014 3:58 pm

choose("song1", "song2", "song3", "song4", "song5")
This way works fine thank you!

But i got a problem.
I have set like:

If song1 playing
Picture1 position x,y

If song2 playing
Picture 2 position x,y

etc.

Well... song1(or one of them songs) really starts to play randomly, but pictures position not changin... so it doesn't "see" when (for example)song1 is playing...

How can i resolve it? :shock:
B
4
Posts: 29
Reputation: 262

Post » Thu May 15, 2014 3:50 pm

Hi Valentin,

Well there a various ways to do what you want.

So I had a bit of a play.

Heres a capx on dropbox (quite big cause of the music)

The capx uses a couple of methods to show how to achieve what I think you are looking for.

There are plenty comments in capx so hope you can get some ideas to help you achieve your goal.

Hope this helps.....
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
35
S
13
G
7
Posts: 363
Reputation: 7,283


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests