In need of a little advice regarding a crank handle puzzle ...

Hi there, for the end of our game we're building a devious little puzzle based off crank handles ... but i've run into trouble in using switches and would appreciate someone shedding some light on the best way to solve this ...


So for each crank handle there are four states - 1, 2, 3 and 4


If the player turns the crank handle when it's at state 1 - it turns on crank-switch-01 and turns off crank-switch-04


If the player turns the crank handle when it's at state 2 - it turns on crank-switch-02 and turns off crank-switch-01


If the player turns the crank handle when it's at state 3 - it turns on crank-switch-03 and turns off crank-switch-02


If the player turns the crank handle when it's at state 4 - it turns on crank-switch-04 and turns off crank-switch-03


Each crank handle controls the direction of a statue, and here's where the problem lies ...


The statue has four event pages, one for each switch (crank-switch-01, 02, 03 and 04). However, it seems that when the player turns the crank handle, it cycles through all of these switches in a never-ending cycle but each time it matches an event page's condition and as such it gets stuck in a never-ending loop.


My question would be, what would be the best way to avoid this?


I have attempted to use variables (1,2,3,4 etc) but unfortunately that just won't work as I need specific things to happen according to specific switches.


Thank you!
tbh I would use a variable instead of switches for this.


If you try that and can't get it working, or you don't want to try that and prefer to stick to switches, please show screenshots of the ENTIRE event window for your crank handle and for your statue.  It sounds like you have something set to parallel process, or something with a loop, and neither should be required for a puzzle like this.


How many crank handles are you using, and do they all control the same statue?  Why do you need multiple crank handles if you could just use one?  There must be something more complicated going on here.
Hi there @Shaz, thank you so much for responding so quickly ...


The reason variables won't work is that I require specific things to happen on specific handle turns, for example  One handle controls the length of a bridge


If the handle is at variable 1 then the bridge is in position A


If the handle is at variable 2 then the bridge is in position B etc etc


However within the event dialog you can only select if a variable is greater than or equal to a certain number, so this seems to give me a problem as ...


If the variable >= 3 then the bridge will be in position C - but this also matches the variable being >= 2 and >=1 so the bridge doesn't work at all ... hence the switches idea.


There will be up to 10 different handles spread across the map, each of them controlling either a bridge or a statue so they need to run independently of each other.
...


If the variable >= 3 then the bridge will be in position C - but this also matches the variable being >= 2 and >=1...



Just for this particular issue, and from a purely 'code' point of view, I solve this by having the higher numbers first in the conditional, such that :


>=3..? do something for 3


>= 2..? Will only be 'seen' if >= 3 has not 'fired'


>= 1..? Same; will only be true if 3 and 2 have already had their chance and are false.


Doesn't solve all issues, but may help you to re-think your problem..?


Just sayin'. 
Thank you @Dad3353, although it didn't solve the issue it pointed me towards a better way of doing it and i'm happy to say it's working great now!


Thank you!
If you still need help, please post screenshots.

Original thread: https://forums.rpgmakerweb.com/threads/in-need-of-a-little-advice-regarding-a-crank-handle-puzzle.65652/