Skip to main content

command to open door



  • Dani Noble
    Moderator Beacon of Knowledge Super Star

    Great question mohamed a!

    I would set up the following: An NPC with multiple buttons. A few for wrong answers, and one for the right answer. 

    There a lot of different ways of approaching this, but the easiest would work a little like this: 

    1. For the right answer use: /setblock ~ ~ ~ redstone_block - This will set the redstone block at coordinates you specify. If you're using an iron door, it should be placed one block underneath it. The door will remain open as long as the redstone block is present. 

    2. If you only want the door open briefly and close so the student can't go back, you might want to use a command block chain instead, which is a little more complex. I'd be happy to explain this more in depth. If you're interested, let me know. 

    Hope this helps!

  • mohamed a

    Hi Dani, Thanks for your reply

    I've tried your first solution and it works. I think this is what I need for the maze. I want my students to move forward towards the end if they answer the question provided by the NPC correctly!

    I would be interested in seeing how the second solution would work too. I'm fairly new to Minecraft education. Thanks for your help :)

  • Dani Noble
    Moderator Beacon of Knowledge Super Star

    Sorry, mohamed a, I missed your response. 

    Definitely still happy to share some other options with you. 

    Penny, could you exchange our emails? Thanks!


Please sign in to leave a comment.