Complex object pushing puzzles

TheGamedawg

Veteran
Veteran
Joined
Aug 29, 2014
Messages
350
Reaction score
133
First Language
English
Primarily Uses
Alright, so take a look at this screenshot.


http://imgur.com/uMTlRrk


The goal of this room is to push the orbs in such a way that they'll cover the green buttons.  The orbs keep rolling until they hit a wall, so you need to get clever with how you push them.


The problem I'm getting is making it so whenever an orb passes or lands on a button, it will press it and turn on a switch.  The all 3 switches are on, the puzzle is complete.  I want to make it so any orb can activate any switch, but doing so from what I've researched requires an absurd amount of variables and conditional branches.  I can't help but feel that there needs to be a better way to do this.  Can anyone help?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I would use regions on the green buttons.  Then, assuming your ball events have action button trigger, and a move route that simply says Move Away from Player and ignore if can't move, I'd change the move away from player to be a script call that does the appropriate 'move away from player' if this._regionId() !== X where X is the region id you've used.


You might have to play a bit to get the switches working and stop it looping, but I'd start with an approach like that.
 

TheGamedawg

Veteran
Veteran
Joined
Aug 29, 2014
Messages
350
Reaction score
133
First Language
English
Primarily Uses
I would use regions on the green buttons.  Then, assuming your ball events have action button trigger, and a move route that simply says Move Away from Player and ignore if can't move, I'd change the move away from player to be a script call that does the appropriate 'move away from player' if this._regionId() !== X where X is the region id you've used.


You might have to play a bit to get the switches working and stop it looping, but I'd start with an approach like that.
Alright, so I made it so when an orb stops moving, it will run a conditional branch with a script saying "if this._regionId() !== X" with a simple text display within the branch to make sure it's working.  When it stop rolling however, the game crashes and it says "SyntaxError Unexpected token this".
 

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

Latest Threads

Latest Posts

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,855
Messages
1,017,007
Members
137,563
Latest member
MinyakaAeon
Top