Making a simple puzzle

Discussion in 'RPG Maker MV' started by gearbox15, Sep 5, 2018.

  1. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    Hello I'm a newbie who is trying to create a simple puzzle but I can't figure out how to make it.

    Here is how I want it to go.

    There four column which are basically buttons that the player needs to press in the right order to make an object appear in the room.

    If they press the correct button there is a positive sound effect and they move to the next button.

    If they press the wrong button there is a negative sound effect and they have start over.

    (Please note that themselves column do not change verbally.)

    The issue is that I don't know how to code the tutorials I have watched/read keep going over my head since they don't explain how things like switch or variables work or how to actually put them in any kind of order.

    Any help that is offered would greatly be appreciated.
     
    #1
  2. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,675
    Likes Received:
    3,007
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    You create 4 button events that can be triggered. For each of them, you set a conditional with a variable as a condition. If the variable is equal to a certain value (which will be the order in which you press each switch), play the positive sound and add 1 to the variable. If the player is wrong (which means the "else" branch of that conditional), play the negative sound and reset the variable to 0 (assuming the player will have to restart the puzzle)
     
    #2
    Shaz likes this.
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    #3
  4. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    Ok, I know this going sound frustrating but how I set the variables?
     
    #4
  5. Tea's Jams

    Tea's Jams I'm human Veteran

    Messages:
    753
    Likes Received:
    1,896
    First Language:
    English
    Primarily Uses:
    RMMV
    I don't know if you've seen this tutorial yet, but I hope it helps. :)
     
    #5
  6. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,675
    Likes Received:
    3,007
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    You know how to add content to an event page? If so, there's an a command which is named "Control Variables" in the Game progression section (page 1 of the event commands). Once you select it, a window will pop-out and from there it's really simple. Select the variable, set the operation to "set" and set the constant to the number you want.
     
    #6
  7. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    I think it worked thank you.
     
    #7
    Tea's Jams likes this.
  8. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    Ok a bit follow of up. Now that I have made the basic outline for the puzzle, there is one element I need to really complete it. I need to make a chest that only opens after the puzzle is solved. I needed to a locked chest, I know their places that tell you how to this but everything they goes over my head. I also need for the chest to unlock after puzzle is done.
     
    #8
  9. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,675
    Likes Received:
    3,007
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Once the puzzle is cleared, activate a switch. Make it so in order to open the chest, the switch needs to be active (as a condition in a conditional branch, not as a condition for the event which is on the left side). You can even make another automatic event which appears once your switch is on to play a SE indicating that the chest is unlocked. Make sure to erase that event afterward tho.
     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You could just play the SE in the same place where you turn on the switch when the puzzle is complete.
     
    #10
    MushroomCake28 likes this.
  11. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,675
    Likes Received:
    3,007
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz True lol. Silly me, always thinking about how to complicate stuff.

    Do that instead of my auto event for the SE lol, a lot better.
     
    #11
    Shaz likes this.
  12. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    Ok so how you make a locked chest then?
     
    #12
  13. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Use a chest quick event, then change the first page so what's there only gets executed if the switch is on.

    To do that, go to the bottom of the first page of event commands and add a Conditional Branch to check if the puzzle complete switch is on. Select all the event commands that were auto-created, cut them (Control+X), then paste them into the True branch of the condition. Then in the False branch, just show a message to say the chest is locked.

    It'll be something like this:

    Code:
    If Switch "Puzzle Complete" is ON
      ... these are the event commands that were auto-created in the Chest quick event
    Else
      Text: The chest is locked.
    End
     
    #13
  14. gearbox15

    gearbox15 Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    VNM
    It took bit fielding but puzzle now workes thank you!
     
    #14

Share This Page