For an SFX, how could I skip it if I didn’t want to listen to it in my game?

So I recently made a Five Nights at Freddy’s game in CoSpaces, and part of the game is that you have to listen to a phone call before the main part of the game starts. So I was wondering how I could make it so if somebody finds the phone call boring, they can skip it and get to the actual game. Here is an image of my code:



So in the second photo, I have the SFX on an infinite loop, and once the last SFX plays it bumps up the phone var by one, and if the phone var equals one, it should break out of the loop. Then in the first image it says if the ‘phone’ is clicked, set var of ‘phone’ to ‘two’. And the second image shows, if ‘phone’ equals ‘two’ break out of loop. It doesn’t work though, and I don’t know why. A possible answer would be that it’s waiting for the sound effect that’s playing to be done playing, so I added a ‘stop sound effect 1’ for all of them. It still didn’t work. If you have an answer to this, it would be very helpful! Thank you in advance!

2 Likes

You could put into forever the coblock if phone <1 and into it run the sounds and after them change phone (that was set to 0) to 1, now the codes doesn’t run if phone>1. Hope I solve your problem.

1 Like

That still didn’t work.

1 Like

Can you share your project?

1 Like

It has already been released on the CoSpaces gallery, but here is the link if you: CoSpaces Edu :: Five Nights at Freddy’s (Update)

Also, since I haven’t updated the project, you won’t see my code for trying to get the phone call SFX to stop. But if you take a look around the code, it might make a bit more sense.

2 Likes

I don’t know how to help you solve your problem but the game is really nice. I just make an observation the theme moves too slowly.

What do you mean, the theme moves to slowly, are you saying the game is longish?

sorry I misspelled: I wanted to write " time".

Alright, I’ll see what I can do! Have any other tips?

1 Like