How do I name an audio file with a variable?

Get help using Construct 2

Post » Tue Sep 22, 2015 1:27 pm

Hey guys !

For a little game I'm making, I'd like to do somehting like, the first time you do an action, song "1.wav" is playing, the 2nd time, "2.wav" is playing, etc.


So I did something like "play audio by name" and just put a variable as a name, but it doesn't seem to work. :(
Is it possible to do what I want to do with construct ? :)

Thanks in advance :)
B
7
S
2
G
1
Posts: 51
Reputation: 679

Post » Tue Sep 22, 2015 1:34 pm

str(Variable)

Image
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Tue Sep 22, 2015 1:36 pm

Oh yea, forgot that one !
Thanks a lot @korbaach :)
B
7
S
2
G
1
Posts: 51
Reputation: 679

Post » Tue Sep 22, 2015 1:45 pm

name1.wav
name2.wav
name3.wav
.
.
.

Image
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896


Return to How do I....?

Who is online

Users browsing this forum: Cub3D, David181 and 20 guests