Rainbow Puzzle and Comparing Variables

Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
88
Reaction score
46
First Language
English
Primarily Uses
RMMV
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.
 

Attachments

Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
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.
 

Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
88
Reaction score
46
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top