- Pokémon Essentials Version
- v21.1 ✅
The linked pastebin implements two different types of puzzles: Lights Out and Multiple Buttons that all must be simultaneously pressed.
In Lights Out, interacting with the event toggles itself and neighbouring events to change state, with the goal of making everything match generally. The script is more extendable than that, as it gives you full control in what events are toggled by the triggering event. The solution checking method also allows you to check the state of given events (so you could have a puzzle to create a pattern, instead of just lighting up the entire grid, for instance.
I just didn't really want to lose track of these methods, especially with the talk of implementing puzzles in the server the other day.
In Lights Out, interacting with the event toggles itself and neighbouring events to change state, with the goal of making everything match generally. The script is more extendable than that, as it gives you full control in what events are toggled by the triggering event. The solution checking method also allows you to check the state of given events (so you could have a puzzle to create a pattern, instead of just lighting up the entire grid, for instance.
lo_switch_toggle
takes an arbitrary number of event ids and flips their A self switch.lo_check_puzzle
takes the solution string (as a string of 1s and 0s in the same order as the passed events, with other characters meaning a given event is ignored for the solution checking) and an arbitrary number of event ids. 1s mean the self switch A is true, and 0 means it is false.check_boulder_puzzle
is the multiple buttons puzzle. It takes an array of events that the player pushes, and then an arbitrary number of two element arrays with the x/y positions of the buttons that need to be pressed down for the puzzle to be considered completed.I just didn't really want to lose track of these methods, especially with the talk of implementing puzzles in the server the other day.
- Credits
- Vendily