Rainbow Puzzle and Comparing Variables

● ARCHIVED · READ-ONLY
Started by Lynvia 3 posts View original ↗
  1. I'm having trouble with a Parallel event that controls a puzzle room in my game.
    The floor is marked in multiple colors and each color is a region (R1..R6) moving from Red to Purple.
    The object is to follow the rainbow, or only move from red to orange to yellow etc.

    A parallel event checks the region the player is in and compares it to the region he was in before. If it's > 1 or < 0 then they violated the puzzle and get reset to the start.

    Snip of the event is below.
    var 00009 gets the following script: $gameMap.regionId($gamePlayer.x, $gamePlayer.y);
    RainbowpuzzleEvent.PNG

    When I run this however (Set starting position in room and start game, I get
    upload_2017-7-8_13-59-48.png


    EDIT: Well, and already figured it out. Not the error, but I created a new variable called RegionDiff and set it equal to the difference between Var 8 (stored region) and Var 9 (current region.)

    Then i was able to just do standard IF logic Using the built in Conditional Variable (10) > 1, and another Conditional where variable 10 < 0. Either will reset the puzzle, and it's working now.
  2. Please post a screenshot of the console when that error appears (press F8) so that we can see the entire error sequence. That will tell us what and where the error is really caused.
  3. Hi Andar, believe it or not, five more minutes of pounding away at it and I figured my way past it. See my EDIT above. We crossed paths on our posts. :)

    Thanks for replying so fast, nice to know you're in there helping us.
    Wasn't sure if anyone was checking on a Saturday.