0

I got a tip to break up my questions into parts so here it goes.

Background Information

  1. I have created a "door" that is concrete powder and is pushed up and down by redstone, pistons, and a lever.

  2. how i am making the animatronics move is a scoreboard and a command block scenes when it reaches a certain score and when it does they teleport using /tp @e[type=armor_stand, name=Foxy] 8 11 9 facing 8 11 8 this is right outside the door.

So what i am asking is, how would I use commands blocks and redstone so that when the animatronic is outside the door, it sees if the door is closed, and if not, jump scare? How would i create two paths for it to follow?

1 Answer 1

0

First at the jumpscare block (the block where the animatronic is considered ready to jumscare) place a dirt block below this block. This is important.

Name the armor stand “animatronic”

Make the door an iron door, forcing the player to control it with a lever. YOU WANT THIS. This is the source of the entire jump scare code. This also means the wall that the lever is on must be three blocks thick so redstone can go through it. The level should control the door(the door is simply decoration at this point). Make a redstone path inside the wall that goes up. This is best with slabs going like this to the roof of your build: Redstone demonstration

Once that is we will take out our command blocks. First create a repeating command block. DO NOT CONNECT THIS TO THE REDSTONE. The properties should be: Unconditional, always active, 0 tick delay. Then enter this code:

/execute @e [name= animatronic] ~ ~ ~ /testforblock ~ ~-2 ~ dirt

This command checks if the animatronic is at the jumpscare position.

Then place a conditional chain command block in front of it with the properties always active, conditional, 0 tick delay with no code.

Dont remove the command block because it doesn't have a code. It is simply there to send a signal when the animatronic is on the jumpscare block.

Now feed a comparator out of it. Now place two redstone dust away from the comparator and place another comparator. This is where your redstone from the lever takes place. Connect it to the side of the second comparator(place levers if needed). MAKE SURE THE SIGNAL STRENGTH IS AT 14 WHEN IT CONNECTS OR IT WILL NOT WORK. This will tell the game if the door is closed or not. Now place repeating command block with 0 tick delay, needs redstone, and unconditional and the following code:

/tp @p ~ ~ ~ facing armor_stand [name = animatronic]

This makes the player face the monster as it jumpscares you.

Place a chain command block with the properties unconditional, always active, 25 tick delay. This is the jumpscare command. You choose what to do with it.

Finally place a final chain command block in front of the other one with the properties of unconditional, always active, tick delay varies on how long you want the jumpscare to last. With the code:

/kill @p

That's it!

You must log in to answer this question.