Is there an easier way to do this?

Hello!

I'm having a bit of a pickle trying to build this puzzle.

The concept is simple enough - through a series of button presses, you have to get the needle in a voltage meter to hit the yellow spot without hitting the red spot in order to force a door open.

If you hit the red spot, the voltage meter overloads and explodes. Resulting in Game Over.

Spoiler: Voltage Meter - Green
Voltage Meter - Green.png

Spoiler: Voltage Meter - Red
Voltage Meter - Red.png
So I made a series of images, thinking I could just use Erase Picture, Show Picture to indicate the change in voltage when the player presses the button. But I ran into problems on the Reset Button.

Basically I tried to use Show Multiple Choices to do this, buuuut...

Let's say the Player, after pushing Button 1, wants to hit Reset, which would recall the first image.

How would I go about that in an easier manner than just using Show Multiple Choices over and over again?

Here's the Script I currently have:

Spoiler: Scripting
Script for Voltage Meter.jpg
Could you possibly put "jump to label" and then "label" at the top?
you dont need to erase a picture and than show picture. as long its picture one,
it overwrites it.

but in my opinion, you can best use switches or variables with and conditional branch.
Aloe Gunver I think has conditional branch ++ plugin.
if you use KeyMapper plugin as well, you can use arrows press and variables.
if you press the wrong button, -1 variable or +4 to the red voltage, or similair.

I cant help you atm, but there are some usefull plugin to achieve the way you want it though.
as well multiple ways to achieve it.
Could you possibly put "jump to label" and then "label" at the top?

I'm still new to RPG Maker, so I didn't know labels were a thing. After looking it up, it looks to be exactly what I needed! Thank you!

you dont need to erase a picture and than show picture. as long its picture one,
it overwrites it.

but in my opinion, you can best use switches or variables with and conditional branch.
Aloe Gunver I think has conditional branch ++ plugin.
if you use KeyMapper plugin as well, you can use arrows press and variables.
if you press the wrong button, -1 variable or +4 to the red voltage, or similair.

I cant help you atm, but there are some usefull plugin to achieve the way you want it though.
as well multiple ways to achieve it.

I am very much interested in these plugins you speak of, and will definitely check them out. Also that KeyPad Mapping idea is truly something to think about, it could help with immersion and other useful things.

Thank you both for the feedback. Unfortunately I have work in 40 minutes, so I can't try out your ideas just yet. But I will let you know if they work! Thank you again!
I dont say KeyPAD but KeyMapper, which allow you to use your full keyboard
for isTriggered("K") or isPressed("K") to see when K is being triggered or pressed
full syntax = input.sTriggered("KEYCODE")
if you want K or B is triggered use || or if you want both to be pressed use && 🙂
some do that with skills in battles to perform an powerfull attack.


here is the conditional branch+ pluginm but while there are different keymapper plugin,
find what suit you best.
Could you possibly put "jump to label" and then "label" at the top?

Update!

So I tried out that method, but it seems that it doesn't jump between Event Pages.

Which disheartened me a bit, not gonna lie. But I'm sure there's a work around for that I hope...
Update!

So I tried out that method, but it seems that it doesn't jump between Event Pages.

Which disheartened me a bit, not gonna lie. But I'm sure there's a work around for that I hope...
Is there a way to keep it all on one page? You can group them with self switches still (under condition branching).
Label only make your event more complicated.

Use loop to trap your event inside a cycle.
Use variable to remember your step / progression. You may regress this "step" value when you pick wrong choice or whatever. And either exit or success will break the loop.
I still don't get the detail of what you are trying to achieve. But at least the event structure should've been like this.
1590474081627.png


Use the show picture as you see fit wherever.
Label only make your event more complicated.

Use loop to trap your event inside a cycle.
Use variable to remember your step / progression. You may regress this "step" value when you pick wrong choice or whatever. And either exit or success will break the loop.
I still don't get the detail of what you are trying to achieve. But at least the event structure should've been like this.

This is solid advice, and I like the much easier flow of the example seen here.

But the problem I'm getting at is the RESET Button seen in the corner.

I am wondering if there's a way to, regardless of how far you get through the puzzle, to return to Phase 1 (Voltage Meter Green).

I could just change the image and get rid of the RESET Button altogether if there's not.
This is solid advice, and I like the much easier flow of the example seen here.

But the problem I'm getting at is the RESET Button seen in the corner.

I am wondering if there's a way to, regardless of how far you get through the puzzle, to return to Phase 1 (Voltage Meter Green).

I could just change the image and get rid of the RESET Button altogether if there's not.
Wouldn't setting the variable to "0" on reset effectively be doing this. Additionally, you can change the picture in the "reset" part, too. I did a quick portion of the event for demonstration, but you would need the full thing. For the normal steps, you could also put +1 for them and have a condition branch check if it's past a certain point.
1590662113818.png
Yea... move that initial value (that first command which set the variable to 0) to the last then set it to one inside a condition which check if the progress is above zero.
That way, the first time you encounter the puzzle it will start from zero.
If you don't make any progress at all, it stays zero.
Only if you make progress (which is above zero), when you restarted, it will reset to progress one.

Unless I misunderstood your intention.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-an-easier-way-to-do-this.121998/