Need help with color change puzzle.

Discussion in 'RPG Maker MV' started by Nekohime1989, Sep 14, 2019.

Thread Status:
Not open for further replies.
    Tags:
  1. Nekohime1989

    Nekohime1989 'Monks Are Awesome' Veteran

    Messages:
    342
    Likes Received:
    155
    First Language:
    English
    Primarily Uses:
    RMMV
    upload_2019-9-13_19-46-6.png
    Player Objective: Flip the switches so the spheres on the pillars near them match the color of the switches.
    But there are rules at play here.
    Red Switch: Vertical Swap (if switch 1 or 3) or Horizontal Swap (if switch 2 or 4)
    Yellow Switch: Diagonal Swap
    Green Switch: Move the colors CW
    Blue Switch: Move the colors CCW
    (and yes you can and only can flip each switch once, which means you have to solve it in four moves no less no more XD)

    Now that I've laid out this nasty puzzle i need to figure how to set up the events. but i have no clue how to even approach this.
     
    Last edited: Sep 15, 2019
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,718
    Likes Received:
    11,429
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Is there a way to reset the puzzle?

    What are the map coordinates of each of the spheres?
     
    #2
  3. Nekohime1989

    Nekohime1989 'Monks Are Awesome' Veteran

    Messages:
    342
    Likes Received:
    155
    First Language:
    English
    Primarily Uses:
    RMMV
    leave the map and come back its a small room.
    would changing the direction of the sphere be the best approach :wub

    red is down (2)
    yellow is left (4)
    green is right (6)
    blue is up (8)

    so how would i do those operations if they're postions like above?
     
    Last edited: Sep 14, 2019
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,718
    Likes Received:
    11,429
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    No, your first idea is okay. I just needed to know the coordinates and how you would reset :)

    What are the x and y coordinates, and the event id (EV00?) of each sphere?
     
    #4
  5. Oddball

    Oddball Veteran Veteran

    Messages:
    1,560
    Likes Received:
    390
    First Language:
    English
    Primarily Uses:
    N/A
    I think this would require four different variables, and four event pages for each sphere. Each switch would be able to add/subtract numbers from the variables. Each sphere would then go off ONE of these variables. Just make the levers (On map) that affect the spheres you want affect the right variables

    Now, you also should probably set up another event that checks for the variables in conditinal branches. It would probably have to be parralel process, and to prevent lag, make a condition in the event so it's not there when the puzzle isn't active. In each of the levers, make a switch (event page) where if Switch X is off, it turns on. Then just do conditinal branches in conditinal branches to check for completion

    If you want a reset mechanism. Make each lever turn on a switch as well. Then, you can make either the stairs, or something the player can interact with turn the switches off and reset the variables
     
    Last edited: Sep 14, 2019
    #5
  6. Nekohime1989

    Nekohime1989 'Monks Are Awesome' Veteran

    Messages:
    342
    Likes Received:
    155
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz
    ID: 4, Pos: 48,27 'blue'
    ID: 5, Pos: 53, 27 'green'
    ID: 6, Pos: 48: 32 'red'
    ID: 7, Pos: 53, 32 'yellow'

    you cant reset the puzzle less you leave the room. (less you solve it, then it wont reset no matter what)


    edit: figured out how to do the first 2 switches. (second switch is swapping both x and y as its basically a 180 degree rotation
    Code:
    ◆If:Script:$gameMap.event(10).direction() === 6
      ◆Play SE:Buzzer2 (90, 100, 0)
      ◆
    :End
    ◆Play SE:Switch3 (90, 100, 0)
    ◆Set Movement Route:This Event (Wait)
    :                  :◇Direction Fix OFF
    :                  :◇Turn Left
    :                  :◇Wait:3 frames
    :                  :◇Turn Right
    :                  :◇Wait:3 frames
    :                  :◇Direction Fix ON
    ◆Control Variables:#0006 Puzzle State += 1
    ◆Comment:Swap X
    ◆If:Script:$gameMap.event(4).x===48
      ◆Script:$gameMap.event(4).teleportToPoint(53, $gameMap.event(4).y)
      ◆
    :Else
      ◆Script:$gameMap.event(4).teleportToPoint(48, $gameMap.event(4).y)
      ◆
    :End
    ◆If:Script:$gameMap.event(5).x===48
      ◆Script:$gameMap.event(5).teleportToPoint(53, $gameMap.event(5).y)
      ◆
    :Else
      ◆Script:$gameMap.event(5).teleportToPoint(48, $gameMap.event(5).y)
      ◆
    :End
    ◆If:Script:$gameMap.event(6).x===48
      ◆Script:$gameMap.event(6).teleportToPoint(53, $gameMap.event(6).y)
      ◆
    :Else
      ◆Script:$gameMap.event(6).teleportToPoint(48, $gameMap.event(6).y)
      ◆
    :End
    ◆If:Script:$gameMap.event(7).x===48
      ◆Script:$gameMap.event(7).teleportToPoint(53, $gameMap.event(7).y)
      ◆
    :Else
      ◆Script:$gameMap.event(7).teleportToPoint(48, $gameMap.event(7).y)
      ◆
    :End
    not sure how to do the rotation though :p
     
    Last edited: Sep 15, 2019
    #6
  7. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,804
    Likes Received:
    7,618
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #7
Thread Status:
Not open for further replies.

Share This Page