Rainbow Puzzle and Comparing Variables

Lynvia

Veteran
Veteran
Joined
Oct 14, 2015
Messages
88
Reaction score
45
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
29,186
Reaction score
6,758
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
45
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 Posts

Latest Profile Posts

That moment when you post the wrong download link to your game and wonder why it got so few downloads... :mad:
Trying to make it so my map is cleared of "random" events after the player leaves the map... to little success >.<
Had my first interaction with a legit homophobe concerning one of my games today. Tempting to engage, but pointless.
The BIGGEST immersion breaker for Sword Art Online is that Kirito keeps finding overpowered playstyles using "bad things nobody uses cuz its bad". Players WILL use bad gear BECAUSE it's bad.
When I said I'd make 20 games in 2020, I scared myself. Now it's mid-February, and I've made 6 games. So I got this. But, then again...do I got this?

Forum statistics

Threads
94,238
Messages
919,289
Members
123,945
Latest member
fit2def
Top