MV Puzzle Functions

This plugin adds some functions to use that may help with eventing puzzles and/or quests.

1. Self-switch flipping
Change self switches for any event from any event
Change self switches for events adjacent to other events
Specify turning these self switches off, on or flip them

2. Determine location without having to use Control Variables beforehand.
Test to see if an event or player is at an x,y location
Test to see if an event or player is at another event’s location

3. Group switch/self-switch checking
Test to see if a group of specified switches are on or off
Test to see if a group of events have a certain self switch on or off

4. Checking event activation order
Set a combination
Make events add combination values
Check if the player has activated the events in the right order set in the combination specified.

5. Multiple Item Checking
Check if there are multiple items, armors, weapons in inventory using code with only one conditional branch.

Simple examples of all of the above can be seen in the demo.

VERSION 1.1 – RPG Maker MV
Download Plugin file
Download Demo


18 thoughts on “MV Puzzle Functions

  1. Yulia says:

    Hi! Thank you for your great plugins!
    I have an issue with checking event’s location. When I’m trying to make an event check if it’s at the same position as another event usin a scriptcall like Galv.PUZ.isAt(7) in parallel process it gives me an error “Cannot read property ‘x’ of undefined”. Is it possible to fix this or am I doing somethin wrong??

  2. Lenin says:

    Hi Galv thanks your puzzle functions plugin but I got a problem, i just need to check the X coordinate of my event because the Y would be random so I can’t check it and I can’t leave the Y blank because it returns an error, what should I do?

    • Galv says:

      If you just want to check the x coordinate for an event you can do that in control variables > game data already. You don’t need this plugin for just that :)

      • Jack Williams says:

        Hey Galv. This plugin is awesome! Thanks for making it! But I am having a problem with it. So, I want to make a puzzle where there are four valves that you have to turn in a specific order and
        something will happen. Each valve has a script consisting of a conditional branch if the player has a wrench or not. If he does, he can turn the valve, and then your plugin comes in. The line of script is exactly like this:
        ‘Script : Galv.PUZ.addToComb(1,1);’
        And replace the last ‘1’ with the sequential number of the valve, ex. (1,1) (1,2) (1,3) (1,4). Next, I put a event that is triggered by the script ‘Galv.PUZ.checkComb(1)’ (Event Touch) so It’ll play when you successfully complete the puzzle. But whenever I playtest, a error message appears once I turn a valve.

        Cannot read property ‘1’ of undefined

        PLZ HELP!
        Yes, I’ve tried more than once.

      • Galv says:

        Unfortunately I don’t have any free time these days to help everyone individually – I recommend asking in a forum for someone to spot where the error is.

        And make sure you start a new game after adding the plugin.

  3. Sakura Martinez says:

    Hey, Galv. Thanks for this awesome plugin. I have a question. I am trying to create a puzzle that requires you to use a set of buttons several times using various sequences.

    I tried following the demo, but I am confused. If I am to use 3 combinations, how would I go about checking if the player has inputted the three correct combinations using only 4 buttons?

    I tried putting 3 Galv.PUZ.setCombo in one auto-run event, but that didn’t work.

    • Galv says:

      Each combination has a unique id that you have to use when adding/checking/creating them. I can’t see what you tried putting in.

  4. Siklo says:

    Hello Galv.
    First of all thank you for all the hardwork creating these awesome plugins.
    I’m getting an error when I try to check an event’s selfswitch state on a conditional branch.
    The dev console spits out:
    /C:/Users/routetomyproject/js/plugins/YEP_BuffsStatesCore.js:2099 CONDITIONAL BRANCH SCRIPT ERROR
    /C:/Users/routetomyprojec/js/plugins/YEP_BuffsStatesCore.js:2100 Galv.PUZ.selfSwitchesOn(b,19)
    /C:/Users/routetomyprojec/js/plugins/YEP_BuffsStatesCore.js:2101 ReferenceError: b is not defined

    The game doesn’t crash, but it keeps going as if the selfswitch hasn’t been flipped to ON (even though it has).
    If I turn off all Yanfly plugins then the game DOES crash with a “b is undefined” message.

  5. Karamren says:

    Hi Galv!This plugin is really awesome.
    But I want to know if it can work with extend selfswitches added by YEP_SelfSwVar?
    If can’t,can you add compatibility for it?
    sorry for my bad English.^ ^

  6. Kurtkakes says:

    Hey, Im having a problem with this, the problem is i cant set the conditional branch if script; Galv.PUZ.isAt(#) event as a parallel, any fix for this?

  7. Kurtkakes says:

    Ah, I just read the first comment so please ignore my first comment, but now I have another problem, I have 2 characters running around and when they bump into eachother they jump back, but that makes me have to put one event as through in order to work, but when they are, it will cause the event to go out of boundry, any way to fix this?

  8. cakragamedev says:

    Mr. Galv. Is there a way to spawn the event on the player’s location? Then how do I spawn the event around the player’s coordinates, for example, 25 squares from the player?

    • Galv says:

      I assume you meant to post on the event spawner? Replace x and y with: $gamePlayer.x and $gamePlayer.y for the player position (going from memory here). For 25 squares from player, I don’t have an easy answer, I’d post in the forums exactly how you want that to work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s