Discuss Scratch

BrandonEpixYT
Scratcher
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.
Mole_Gaming
Scratcher
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.

setbon-bon's doortopickrandom1to2ifbon-bon'sdoor=freddy'sdoorthenplaysoundBon-Bon, go g-get him!elseplaysoundGet ready for a surpriiiise!wait2secsifitembon-bon'sdoorofdoors=openthenjumpscareelseplaysoundthud

Last edited by Mole_Gaming (June 3, 2018 22:10:45)

BrandonEpixYT
Scratcher
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
Scratcher
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:
repeat10addyestolistitem9oflistthis would be "yes" since the 9th variable in the list is "yes"

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
replaceitem1ofdoorswithclosed
and if they opened door 2, you would use
replaceitem2ofdoorswithopen

Last edited by Mole_Gaming (June 3, 2018 22:10:36)

BrandonEpixYT
Scratcher
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
Scratcher
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
Scratcher
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.

setrandomtopickrandom1to2pick bon-bon's doorifrandom=1thensetbon-bon's doortorightelsesetbon-bon's doortoleftsetrandomtopickrandom1to2pick freddy's closetifrandom=1thensetfreddy's closettorightelsesetfreddy's closettoleftifbon-bon'sdoor=freddy'sclosetthenplaysoundBon-Bon, go g-get him!elseplaysoundGet ready for a surpriiiise!pick which sound to playwait2secsifbon-bon'sdoor=rightthenifrightdoor=openthenjumpscareelseplaysoundthudif it's the right door, test to see if the right door is openelseifleftdoor=openthenjumpscareelseplaysoundthudif it's the left door, test to see if the left door is opentest to see which door bon-bon is going to

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.
BrandonEpixYT
Scratcher
11 posts

Five Nights At Freddy's Help

Thanks

Powered by DjangoBB