- 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

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.
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

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
-
52.5 KB Views: 4
Last edited:

