MZ Looking for A Timer Bar shown on the map that flips a Switch (On and Off) when it's done and Removes itself after

Hello! First of all thank you very much for taking the time to have a look at my request, I appreciate it very much!

Edit: This is the plugin I used for MV https://forums.rpgmakerweb.com/index.php?threads/timed-bar-display.68409/

I had a plugin like this before for MV but I couldn't find one for MZ 😅
I'm looking for a plugin that creates a single Timer on the map scene, in the most simple form it would look something like this on the map.

1711725825569.png


The window will show up when the Timer is called and it will remove itself automatically from the map once it's finished.
The main functions of the plugin I'm looking for is: Using plugin commands or scripts,
  1. Set how many Seconds the bar takes to fully deplete
  2. Set which Switch it will flip ON or OFF vice versa, depending on the current state of the Switch
  3. Able to remove the Timer manually, for when player finishes the task before the time is up

If possible, I would also like to be able to replace the base window with a image and set a Hurry Up! text, but I understand if that's too much work! I'll be grateful even finding something with just the 3 functions above, it is more than enough.

Again, thank you very much for your patience and reading till the end! 🙂
Maybe you want something more fancy, but I believe this is possible with the Show Picture and Move Picture commands, plus a switch or two. E.g.
Spoiler: event structure
  • First event, 3 pages:

    1. Condition: (None), Trigger: Action Button.

      ◆Text:None, None, Window, Bottom : :Quick, pull that lever! ◆Comment:Activate page 2 of this event (parallel). ◆Control Switches:#0003 Timer = ON
    2. Condition: Switch 3 is ON, Trigger: Parallel.

      ◆Comment:Show gauge at 100%, scale down to 0%, then erase. ◆Show Picture:#1, GaugeBack, Upper Left (0,0), (100%,100%), 255, Normal ◆Show Picture:#2, GaugeFill, Upper Left (0,0), (100%,100%), 255, Normal ◆Move Picture:#2, Linear, Upper Left (0,0), (0%,100%), 255, Normal, 300 frames (Wait) ◆Erase Picture:#1 ◆Erase Picture:#2 ◆Comment:Turn on "timer end" switch (activates page 3). ◆Control Self Switch:A = ON ◆Comment:Turn off this page. ◆Control Switches:#0003 Timer = OFF
    3. Condition: Self Switch A is ON, Trigger: Autorun.

      ◆Comment:Activated by page 2 on timer end. ◆Text:None, None, Window, Bottom : :Too slow! ◆Comment:Reset. ◆Control Self Switch:A = OFF

  • Second event, the lever to turn off the timer while it's running:

    1. Condition: Switch 3 is ON, Trigger: Action Button.

      ◆Play SE:Switch1 (90, 100, 0) ◆Set Movement Route:This Event (Wait) : :◇Direction Fix OFF : :◇Turn Right : :◇Wait:3 frames : :◇Turn Left : :◇Wait:3 frames ◆Comment:Erase gauge pictures early, and stop the Parallel event page. ◆Erase Picture:#1 ◆Erase Picture:#2 ◆Control Switches:#0003 Timer = OFF ◆Text:None, None, Window, Bottom : :Phew, that was close!
There may well be a plugin for this, though.
@caethyril Thank you for the reply! This event chain works wonders!
I'll keep this thread open in case someone finds a plugin that streamlines this, but your solution its exactly what I needed for my level! Thank you very much!!
🙂
I dont know if galv ported his variable bar as that can work, you can
make it how you like it.

if you have a link to the MV version you used and worked, it might be
able for an easy port (if the authors allows it to).

but if it's not really required, the event way is ideal if you only need it a few times.
@ShadowDragon
Thank you for the reply! It is something I'll need a lot as its a repeating mini game in many maps, so a plugin is preferable in the long run. I checked Galv, but he doesn't have the variable bar for MZ. I'm still just glad that I could find a work around for now and very grateful for the help given.

This was the original plugin I used for MV, but the author hasn't listed any terms regarding ports, so I didn't link it to be safe. I'll place it in the original post as well
You can probably do this with a parallel common event and SRD HUDMaker. Turn on the switch and declare the initial time values from whatever event starts the timer, then have SRD HUDMaker visually display the bar and text while the parallel common event subtracts from the current time value and switches itself off when it hits 0.
@AquaEcho
Thanks for the suggestion! Didn't know about HUDMaker, seems like a faster way to make the bar when paired the eventing. I'll try it out thank you~
SRD HUDMaker is probably THE best plugin for RPGMaker MV/MZ, the MZ version even has extra features. It's a WYSIWYG editor to show data or pictures on the screen. Extremely useful for testing too as you can use it to see how variable values change in real time.
HUDMaker still require a parallel event to make it functional, but at least
a bit less, 2 variables, 1 switch, as the text can be on top or use a 3rd variable
to alter the text what you need to show with conditions.

so a simple plugin by scriptcall is maybe easier than using images that require
mostly preloaded.

Edit:
Looking at the code, some minor things need to change and it should work
in MZ, if I know how the images being get there, and change the sprite part.
it should work just fine, so it should be doable to convert this.

Original thread: https://forums.rpgmakerweb.com/threads/looking-for-a-timer-bar-shown-on-the-map-that-flips-a-switch-on-and-off-when-its-done-and-removes-itself-after.167297/