playing random sound

Get help using Construct 2

Post » Sun Nov 04, 2012 11:05 am

hi people,

i looked at this http://www.scirra.com/forum/play-random-sound-when-something-happens_topic58889.html topic but i think c2 has changed a bit since that topic was replied. or i am missing something.

i have 6 sound files, like positive1, positive2, positive3, etc.
and i am trying this:

play (by name)"positive & 1+floor(random(6))" but it doesn't work.
i also tried "positive&choose(1,2,3,4,5,6)" and things like this.

what am i doing wrong exactly?

thanks in advance.
B
14
S
4
G
3
Posts: 101
Reputation: 3,499

Post » Sun Nov 04, 2012 11:08 am

play by name

choose("sound1","sound2","sound3")
B
44
S
13
G
8
Posts: 622
Reputation: 7,417

Post » Sun Nov 04, 2012 11:10 am

:D thanks a lot CrudeMilk, works perfect.
B
14
S
4
G
3
Posts: 101
Reputation: 3,499


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests