Pushing Puzzle

VixelPixel

Warper
Member
Joined
Mar 25, 2017
Messages
4
Reaction score
0
First Language
English
Primarily Uses
N/A
I want to have a puzzle where you need to push crystals to certain areas. When all are on said area, the way out will open. I have already got it set up where the player can push the crystal but I am having trouble with everything else. Can anyone offer help?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I'm assuming all the crystals are on the same map? Does each one have to go in a specific spot, or do you just have X crystals, X destinations, and it doesn't matter which one goes where, as long as all the destinations have a crystal on them?

If that's the case, draw on each destination tile with a region id (the same one).
Create a common event that does this (I'll assume Event 1 is one of your crystals, and you've used region #15 - change as necessary):
Code:
Change Variables: Event's X Position = Game Data > Event 1's X position
Change Variables: Event's Y Position = Game Data > Event 1's Y position
Get Location Info: Event's Region ID = Region ID from Event's X Position and Event's Y Position
Conditional Branch: Event's Region ID is not 15
  Exit Event Processing
End

<now repeat that for each of the other crystal events - you can use the same variables as above - you don't have to have a set for each event>

Comment: if we reach this line, all of the crystals are on tiles with region 15
Control Switches: Way Out Found = ON
Then on each of your crystal events, do a move away from player with wait for completion, then call that common event. You might want to add an extra page to each one with the Way Out Found switch as a condition, so it can't be moved anymore once the way out is found.

And of course condition the exit event with the same switch, so it's only visible after all crystals are placed correctly.

So each time you push a crystal, it will move, then the common event will be called to see if ALL crystals are on the correct region tile. If they're not, the common event will drop out and the switch will not be turned on. If they ARE all on the correct region tile, the switch will be turned on, and the exit will be visible.
 

VixelPixel

Warper
Member
Joined
Mar 25, 2017
Messages
4
Reaction score
0
First Language
English
Primarily Uses
N/A
Thank you so much!
There are two types of crystals though, both which can only go in certain places.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
It's a simple change to the above - use two region IDs instead of one, and when checking each event, compare the region ID to whatever is correct for the type of crystal on that event.

How many crystals are we talking about? Two in total - one that has to go to one spot, and another that has to go to another spot? Or are there several of each type? Either way, you can use the above method.
 

VixelPixel

Warper
Member
Joined
Mar 25, 2017
Messages
4
Reaction score
0
First Language
English
Primarily Uses
N/A
4 red and 2 blue. The colors have to go to the same place but crystals of the same color can replace each other, since you were curious.

Thank you for your help! ^u^
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Sounds good. Then using 2 region IDs, one for each colour, will do the trick. Just make sure the correct # is being checked for each event, and it should be fine.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
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'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top