How do I set a sound the right way

Get help using Construct 2

Post » Mon Feb 23, 2015 11:39 am

Hi yall,

I am with a little issue here.
As active followers of the forum will notice is that i post pretty much "How do i...?" threads.

I am doing that because i want to learn how to do some steps the right way and not my way ( which is mostly very unclean ;)! )

As for this item i have a level select area.
Let say:
Level 1
Level 2
Level 3

Each level contains a play button. Each play button has it's own sound. By clicking the play button the right sound has to play.

Yes, it "sounds" ( no pun intended ) fairly easy but the only way i can be thinking of is like:
Image

Somehow i have the feeling that is NOT the way to do it since i have 100+ different levels..

Please enlighten me :)!

Thanks in advance!
B
10
S
4
G
3
Posts: 163
Reputation: 2,507

Post » Mon Feb 23, 2015 3:29 pm

If you tag the sounds as "Level1", Level2", etc, then you can just do one event and play tag = "Level"&currentLevel
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Mon Feb 23, 2015 3:41 pm

Thanks for your reply!

I did not use tags but after reading your reply i did have the idea to name the files as in: categorylevel1, categorylevel2

Now i can use global variables "category" to set the category, and level"currentLevel" for the current level!

Thanks for the hint!
B
10
S
4
G
3
Posts: 163
Reputation: 2,507


Return to How do I....?

Who is online

Users browsing this forum: maxwell88 and 10 guests