How to make a gauge bar with a moving indicator that the player needs to follow?

Bestboy

Regular
Regular
Joined
Jul 20, 2021
Messages
42
Reaction score
7
First Language
English
Primarily Uses
RMMV
Sorry, the title may be a little confusing since I'm not entirely sure how to phrase my idea. So I drew a picture, hoping it could explain stuff better.
无标题.png
The black rectangle in the picture does not move, while the blue part slides left and right.
the player controls the red arrow with the 'left' and 'right' keyboard, making the arrow follow the moving blue part.
If the red arrow follows the blue part for a certain time, it's a success.
If the red arrow is unable to follow the blue part for a certain time, it's a failure.

Any ideas or help would be great, Thank you!
 

Mac15001900

JavaScript wild sorcerer
Regular
Joined
Aug 7, 2022
Messages
390
Reaction score
520
First Language
English
Primarily Uses
RMMV
This would be quite tricky - it might be possible with just events, with the player being the arrow, and the bar being 3 tiles wide. Then just have a random, fast move route for the bar, and keep checking if player's X is either equal to the event or different by one with a parallel event.

It would be a bit janky, but should work. To do anything better you'd probably need a custom plugin written.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,186
Reaction score
3,435
First Language
Dutch
Primarily Uses
RMMV
eventing it can work quite nicely for the array part and blue too,
time disstance is a different story.

you need at least 4 variables (blue block) and arrow variable.

start = 0 (most left) and 100 or 200 on the far right.

now when the left key is hold down, variable of the array = -1 and wait 10 frames
same for the right arrow key + 1 and wait 10 frames

you can play around with 5 frames, but I wont recommend lower, but more higher.
for the blue one that is automatically, you can create a new parallel for this part
as a controller, but it can be tricky to set it up, as variable < 0 = 0 and >= 100 = 100
respectively (depending on the max number on the end).
checking variable 1 and 2 for the range of success (a timer plugin might be added as
well if you want a duration when ending it and a 4th every x second + 1 and check
that value on the end if its succeeded or failed.

but it depends where you use it and when to use it, because that isn't clear.

if you use it more often, a plugin might be required if its to complex, but you can
control the difficulty with conditions wait frames (they should be equal).

there is also some events with time bar (not teh same as yours) but more with
pressing the button and with the use of Galv_VariableBar, you can pull it nicely
off or through an event one made (forgot the name) which is also pressing the
button.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,240
Reaction score
4,695
First Language
EN
Primarily Uses
RMMZ
If you want to event it, you may find this tutorial helpful:
It describes how to set up a loop to check player input and update variables/pictures/etc accordingly. The end result (stationary target, auto-moving cursor) is different from what you want, but the basic structure should work for pretty much any system like this.
 

Bestboy

Regular
Regular
Joined
Jul 20, 2021
Messages
42
Reaction score
7
First Language
English
Primarily Uses
RMMV
Thank you for all the help! I know what to do now, thank you!
 

Arrose

Regular
Regular
Joined
Jun 16, 2023
Messages
60
Reaction score
11
First Language
Not English
Primarily Uses
RMMZ
If you want to event it, you may find this tutorial helpful:
It describes how to set up a loop to check player input and update variables/pictures/etc accordingly. The end result (stationary target, auto-moving cursor) is different from what you want, but the basic structure should work for pretty much any system like this.
Great, this works great for fishing or lock picking, or other mini-games!
 

Latest Posts

Latest Profile Posts

Albert.png
You're welcome! Fly in, take Albert in my style
The flight sim I've bought has some amazing priorities.
If I land with one wheel slightly off the runway, but it's an otherwise fine landing, it doesn't count. But if I touch down on the runway so hard it makes me bounce back into the air and crash in the next 10 seconds, as long as it's on the runway, it's a successful landing.
Mike Final Breaker.png
that time I drew Mike doing Hugo from Street Fighter 3's Shootdown Backbreaker...
So I was thinking about putting in Weapon Synthesis like the Cooking system I got going but after all these recipes I've been putting in the item log and common events for the past week and a half I'ma say no on that one chief

those shops and chests are working just fine lmao

Forum statistics

Threads
136,637
Messages
1,268,279
Members
180,323
Latest member
fruy229
Top