Problem with sounds!

Get help using Construct 2

Post » Fri Oct 06, 2017 3:53 pm

Sorry for being stupid but I don't quite understand :p

Would you mind if I send you the capx-file so you can fix it for me? I would be extremely grateful if you could do so :)
B
21
S
6
G
3
Posts: 93
Reputation: 2,977

Post » Fri Oct 06, 2017 3:54 pm

Sure, if it's not too big :)
my email: <censored>
Last edited by dop2000 on Fri Oct 06, 2017 4:35 pm, edited 1 time in total.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,765
Reputation: 67,851

Post » Fri Oct 06, 2017 4:01 pm

I've just sent you an e-mail. You are amazing for doing this :)
B
21
S
6
G
3
Posts: 93
Reputation: 2,977

Post » Fri Oct 06, 2017 4:09 pm

Here you go:

Image

I noticed you never use sub-events in your game. This is a sub-event, it's only executed if the parent event is executed (if Player is on the Floor)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,765
Reputation: 67,851

Post » Fri Oct 06, 2017 4:13 pm

It works great! Thanks again, you are an angel :)
B
21
S
6
G
3
Posts: 93
Reputation: 2,977

Post » Fri Oct 06, 2017 4:16 pm

No problem!
Or you can do this:
Image

This means - if sound is playing, stop it. And then play the sound from the beginning.
(oops, forgot to delete the old line with empty "" tag)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,765
Reputation: 67,851

Post » Fri Oct 06, 2017 4:19 pm

Your first solution works great so I'm going to stick with that one. You can't believe how happy I am now because I've been trying to solve this bullcrap for like 5-6 hours haha
B
21
S
6
G
3
Posts: 93
Reputation: 2,977

Post » Fri Oct 06, 2017 4:26 pm

Another thing I noticed - you have almost identical event sheets for levels 1 and 2.
You can delete EventLevel2, and set the same event sheet for both layouts.

If you need to do something different for each level, just check which layout is active:
Image
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,765
Reputation: 67,851

Post » Fri Oct 06, 2017 4:38 pm

How do I check which layout is active? When the Player collide with GOAL in the first Level, 1 is added to the variable Level2. When 1 is added to Level2 an object in LevelMap is created so you can get access to the second level. When the Player collide with GOAL in the second level, 1 is going to be added to variable Level3 and then create an object in LevelMap so you can access the third level and so on.

Maybe it isn't necessary to have different variables to achieve that?
B
21
S
6
G
3
Posts: 93
Reputation: 2,977

Post » Sat Oct 07, 2017 2:19 am

See my screenshot above how you check which layout is active! :)
System->Compare two values -> LayoutName equals <your layout name>

Instead of having separate variable for each level (Level1, Level2, Leve3 etc), just make one global variable LevelProgress.
Add 1 after completion of each level to it.
In your LevelMap check the value of LevelProgress and unlock next level icon. For example if LevelProgress=2, then level 3 is unlocked.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,765
Reputation: 67,851

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests