Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Five Nights At Freddy's Help
- BrandonEpixYT
-
11 posts
Five Nights At Freddy's Help
Hello, I am working on a fnaf fan game called One Night at Epix's and I have a question. How would any of you recommend coding this mechanic in scratch.
Funtime Freddy returns in the Non-Canon Custom Night, in the East and West closet but instead of trying to get the player, he will send Bon-Bon to attack you. If you hear him say “Bon-Bon, go g-get him!”, shut the door on the side he's on. If you hear him say “Get ready for a surpriiiise!”, shut the door on the opposite side he's on. If you shut the correct door in time, then you'll hear a soft ‘thud’ and it will be safe to open the door. If you fail to shut the door or shut the wrong door, then Bon-Bon will jumpscare you.
Funtime Freddy returns in the Non-Canon Custom Night, in the East and West closet but instead of trying to get the player, he will send Bon-Bon to attack you. If you hear him say “Bon-Bon, go g-get him!”, shut the door on the side he's on. If you hear him say “Get ready for a surpriiiise!”, shut the door on the opposite side he's on. If you shut the correct door in time, then you'll hear a soft ‘thud’ and it will be safe to open the door. If you fail to shut the door or shut the wrong door, then Bon-Bon will jumpscare you.
- Mole_Gaming
-
100+ posts
Five Nights At Freddy's Help
Well first I'd have a list to tell whether or not each door is open or closed. 1 for closed and 0 for open.
Then, when you chose which door bon-bon will go through, wait a couple seconds, and then check to see if that door is open.
Then, when you chose which door bon-bon will go through, wait a couple seconds, and then check to see if that door is open.
Last edited by Mole_Gaming (June 3, 2018 22:10:45)
- BrandonEpixYT
-
11 posts
Five Nights At Freddy's Help
I have never used a list can you tell me what it is doing for this code. Thank you so much for this
- Mole_Gaming
-
100+ posts
Five Nights At Freddy's Help
Lists can store more than one variable. It's a list of variables. If you don't want to use lists I can come up with different code, it would just be a bit more complex.
Here's an example:
In this script, it's storing values that tell whether or not the door is open. (I shouldn't have used 1 and 0, I'll change that after I post this)
So let's say the player closes door 1. You would use
Here's an example:
In this script, it's storing values that tell whether or not the door is open. (I shouldn't have used 1 and 0, I'll change that after I post this)
So let's say the player closes door 1. You would use
and if they opened door 2, you would use
Last edited by Mole_Gaming (June 3, 2018 22:10:36)
- BrandonEpixYT
-
11 posts
Five Nights At Freddy's Help
Will this code also tell it the specific door that has to be closed. like say Funtime Freddy sends out Bon Bon to the left door that the left door must be closed. Also, the variable bon bon's door, how will it be equal with left door and right door.
- BrandonEpixYT
-
11 posts
Five Nights At Freddy's Help
Also, how can I do a code for funtime freddy to move to the other closet at random.
- Mole_Gaming
-
100+ posts
Five Nights At Freddy's Help
I shouldn't have made this so complicated for someone new to scratch, so I'll make the code a bit simpler to understand.
This should work for what you want, I'm a bit busy at the minute so I'm not going to re-explain it, hopefully the notes help enough for the time being. I also added the thing to change freddy's closet.
This should work for what you want, I'm a bit busy at the minute so I'm not going to re-explain it, hopefully the notes help enough for the time being. I also added the thing to change freddy's closet.
- Discussion Forums
- » Help with Scripts
-
» Five Nights At Freddy's Help