Time Based Minigame in RPG Maker MV

Not sure how clear the title is, but I'll try to explain it as clear as I can.
In Witch's Heart, there is a minigame where you're cooking and you have to stop the fire when it looks like the given image.
Screenshot_20220920_120208.jpg


I've been trying to replicate a similar minigame in RPG Maker MV, but to no avail. Does anyone know how I could make something similar? Is there a plugin for this?
I got some idea's, but we need some more information as this require alot
of images? for idk how many different ways?

the easiest way for a time based is how to impliment it.

you could create a common event for the timing stuff, can be simple as:

controle variable10 +=1
if: variable 10 >= 10
show picture1
else
if: script: $gameVariables.value(10) >10 && $gameVariables.value(10)<= 20
show picture1 (different one)
else
if: script: $gameVariables.value(10) >20 && $gameVariables.value(10) < 30
show picture1 (different one)
else
if variable 10 >= 30
text: you failed.
end
end
end

you still need to if "OK" is being pressed added in a separate parallel event
to stop that event and check the cooking if it's succeed, to early, failed etc.

that depends how long you want it to be and how the cooking part works.
I got some idea's, but we need some more information as this require alot
of images? for idk how many different ways?

the easiest way for a time based is how to impliment it.

you could create a common event for the timing stuff, can be simple as:

controle variable10 +=1
if: variable 10 >= 10
show picture1
else
if: script: $gameVariables.value(10) >10 && $gameVariables.value(10)<= 20
show picture1 (different one)
else
if: script: $gameVariables.value(10) >20 && $gameVariables.value(10) < 30
show picture1 (different one)
else
if variable 10 >= 30
text: you failed.
end
end
end

you still need to if "OK" is being pressed added in a separate parallel event
to stop that event and check the cooking if it's succeed, to early, failed etc.

that depends how long you want it to be and how the cooking part works.
The "if OK is pressed" can be in the same parallel. Just wrap it in there, the conditions are already there.

Also, the conditions can be a bit more simplified. Since you already use the else part of the branch, the script part isn't necessary. But it will work this way.
Also I'd personally use an Autorun trigger for this, not Parallel.

This tutorial might be helpful:
It describes how to use event commands to check player input each frame and update pictures on-screen to represent what's happening. The actual example is a little different from what you're wanting, but the underlying structure is the same. 👋
@JohnDoeNews it might be possible, but it didn't really say, and the
condition with scriptcalls is better than "2 if's" under its other to check
if its bigger and than lower as you can do it in 1 line.

condition+ plugin can simplified it, but problem is, he didn't exactly tell
how the timer works, to push him/her to a better direction.

@caethyril the time hits plugin might work, but the looks of it, if it's a timer
or invisible timer to make it to look as the image he shows, how would this
time hits come into place?

it could work, but we need more info from him/her.
so we know what he exactly to expect to happen 🙂
@ShadowDragon Right, I wasn't very clear about what I was trying to achieve so I'll try to be as clear as I can. This is what I was trying to make:

So, the "cooking" starts when a switch is turned on and Common Event A (set on parallel) starts, which add 1 to a Variable 5 after around a second, each time the Variable 5 increases, the food gets more "cooked". I've also made Common Event B that turns off the switch and makes Common Event A stop, no longer adding to the variable 5. When the OK button is pressed or the Variable 5 is bigget than, let's say 5, Common Event B starts.

I have little to no knowledge on programming, and I'm not that of an expert on RPG Maker MV either, so maybe I made a mistake or there's a better way to do it.
can you show the screenshots of those events (+ event itself)
so we can see what you did and where you got wrong?

it can help you fix the issue.
@ShadowDragon Something like this:
Screenshot 2022-09-20 154724.png

Also, The common event B wouldn't run while the wait time wasn't finished (I think). I've been looking for alternatives to replace the run command.
@JohnDoeNews it might be possible, but it didn't really say, and the
condition with scriptcalls is better than "2 if's" under its other to check
if its bigger and than lower as you can do it in 1 line.
I'm at work now. When I come home I'll make a screenshow to show what I mean.

Your idea is good, but you take a few unnecessary steps. Your method will work, though. So that is good. But your method can be made a little easier.

I'll show you when I come home. About 3 hours from now.
@AlxKalionx you show only A, not what is inside B, but you can use
only 1 common event to do all the stuff you needed too.

as you have a switch to run (can be on in parallel) so call that common event
on the event you want to run it.

the label start is unnecessary as it will loop constantly, so you only
need the checks and the conditions.

if var 5 >= 5
do stuff
end
if 5 >= 10
do stuff
end
if 5 < 20
do stuff
else
text: you failed
end

and pressOK button if needed to cancel and reset the timer with an
else condition for perfect or failed.

Like JohnDoeNews said, it can be simpler, as it can be build various ways.
but we lack information on the event.

what you do is call 2x common event B for what reason?
you make it a bit to hard on yourself.
Something like this:
Code:
◆Control Variables:#0001 Timer += 1
◆If:Timer < 10
  ◆Show Picture:#1, 1-PreBaked, Upper Left (0,0), (100%,100%), 255, Normal
  ◆If:Button [OK] is pressed down
    ◆Text:None, Window, Bottom
    :    :Your food is still raw.
    ◆
  :End
  ◆
:Else
  ◆If:Timer < 20
    ◆Show Picture:#1, 2-SlightyWarm, Upper Left (0,0), (100%,100%), 255, Normal
    ◆If:Button [OK] is pressed down
      ◆Text:None, Window, Bottom
      :    :Your food is not nearly done yet.
      ◆
    :End
    ◆
  :Else
    ◆If:Timer < 30
      ◆Show Picture:#1, 3-MediumRare, Upper Left (0,0), (100%,100%), 255, Normal
      ◆If:Button [OK] is pressed down
        ◆Text:None, Window, Bottom
        :    :This is eatable, but it could be better.
        ◆
      :End
      ◆
    :Else
      ◆If:Timer < 40
        ◆Show Picture:#1, 4-Done, Upper Left (0,0), (100%,100%), 255, Normal
        ◆If:Button [OK] is pressed down
          ◆Text:None, Window, Bottom
          :    :Perfect
          ◆
        :End
        ◆
      :Else
        ◆Show Picture:#1, 5-Burned, Upper Left (0,0), (100%,100%), 255, Normal
        ◆If:Button [OK] is pressed down
          ◆Text:None, Window, Bottom
          :    :Your food is burned.
          ◆
        :End
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End
◆Wait:6 frames

The first second the food is raw, the second second (haha) the food is slightly warm, the third second the food is medium rare, the fourth second the food is perfect and after four seconds the food is burned.

Original thread: https://forums.rpgmakerweb.com/threads/time-based-minigame-in-rpg-maker-mv.151430/