Event Spawn Timer

Respawn Timer

Allows you to set a respawn time for events that can activate a self switch or switch once their timer has expired. This time is kept from map to map.
This could be used for things like planting seeds that will grow, enemy encounters that will respawn and more.

Get it here >


29 thoughts on “Event Spawn Timer

  1. hiromu656 says:

    I’ve been testing this for a while now and I don’t really understand how to get this to activate.
    To test I placed a character down, made it so if you press the action button, Self Switch A will activate and he will switch to a blank page. On this page I placed : Script: set_spawn(0,0,5)
    I wanted that event to spawn in 5 seconds.
    So underneath that I put this in a Move route script: do_respawn?(“A”,false)

    Nothing happened, so I switched the order, changed it to parallel, put those script calls on the first page, and did everything there as well. I’m really confused.

  2. hiromu656 says:

    Wow, I didn’t notice that demo link…. I always seem to speak too soon, sorry.

    Great Script! ;(

  3. […] you want to have them respawn, you should check out this script by Galv. It’s awesome and will even respawn aggro mobs on their peaceful event page 1 after a […]

  4. TankenSpank says:

    Love this script but I did have a quick query. In your description you mention that the time is kept from map to map however, when I leave the map the event is one, the timer seems to pause.

    E.g. Growing a crop. When you action an event (pic of a patch of dirt) it turns on the timer.


    and activates self switch A

    Page 2 of the event activates when self switch A is on. It does nothing but has a different image (sprout) and a custom move route that just runs


    Page 3 is set to activate when B is true and changes the image for a third time (fully grown crop)

    This works perfectly so long as I am on the screen with the event. When off screen it actually seems to pause the timer as, if I wait 8 seconds then leave, when I come back the picture changes 2 seconds later

    • Galv says:

      The thing with this is it doesn’t constantly check every timer when not on the map. That’s actually the whole point of the script (to not lag). But it does keep track of the time in a way that will recognise that amount of time has passed when it is checked.
      The point of the script calls being in autonomous movement is so it only checks this when near an event.

      You can update timers from different maps using script calls provided but this script doesn’t make it possible to make event commands work on a different map.

  5. TankenSpank says:

    Please ignore my previous comment. I had multiple timers so timer 2 didn’t start until you’d returned to the page after timer 1 expired.

    Is there a way we can return the value for the timer? So, for example, I could use it in a nested conditional branch.

    if timer <30 then
    do this
    if timer <20 then
    do this
    if timer <10
    do this

    and so on?

    • Galv says:

      In the settings there is:

      # respawn_time(map_id,event_id) # Get amount of time left until respawn for
      # # an event. Can use 0,0 to check the event
      # # and map the control variable is used on.

      Use variables in your example.

  6. JMT says:

    Hey Galv, I’m trying to force a respawn by using do_all_respawn(“A”,false) or with “false” and it’s not working :(
    what am I doing wrong?

    • Galv says:

      I don’t know your setup so I can’t tell what’s wrong.

      Does ‘Not working’ mean you get an error? Or nothing at all happens? If you get an error, what does the error say exactly

  7. JMT says:

    It simply doesnt do anything.
    The event respawns ok by itself but when I force it to respawn using script call – > do_all_respawn(“A”,false) it returns nothing.
    The event continues to be with A true.

    • Galv says:

      Ah, that only forces the respawn -if- the timer elapsed. If the timer is still going, it doesn’t stop the timer and change the switch.

      This is used because all timers aren’t updated unless the player is near the event (this is to allow as many timers as you want without lag). So if you were on another map or not near the events, you would run that script and then use do_respawn?(switch,status) to check if a timer elapsed or not.

  8. JMT says:

    I see, thanks for the support Galv.
    And thanks for your scripts. cheers.

  9. GGfishman says:

    Thank you very much for this wonderful script. I’m a beginner and I have almost zero knowledge about programming. This script made my RPGmaking life much easier.

  10. Rupam says:

    Does the re-spawn time depends on game playtime or original computer time?

  11. OKiREZ says:

    Quick question. I am trying to make enemy encounters that respawn, but I can’t figure it out at all. I looked around on the demo to see if I was missing something, but I can’t figure it out. What I did was,
    (Page One)
    -Create an event (Slime, with Graphic)
    -Battle Processing
    -Script: set_spawn(0,0,2)
    -Control Self Switch A=ON
    (Page Two)
    -Control Self Switch A=ON (With no graphic)

    After I defeat the slime, I wait, and it doesn’t come back :/

    Can anyone help?

  12. OKiREZ says:


    Sorry for double posting, I was looking for a way to edit:

    I switched the graphics on the demo to see if it would work, and it did exactly what i wanted to do. -_- I’m not sure what i did wrong on my test map but so I copied and pasted the demo event onto a test map and it still worked. Not sure what I did wrong lol but awesome script, thank you!

  13. Hello Folks!

    I have been trying to create a respawning treasure chest when leaving the current map. I have used the


    but i dont really know how to set the switch and status to make it work and how to trigger the respawn funtion when leaving for the next map or returning to the map current map to have ALL the treasure chest respawned.

    I don’t want them to respawn while i am on the map running around, that one is easy.

    Is that possible at all?

    Please if anyone know how to make it work. please reply as soon as possible. And i am sorry for my bad Swenglish. ^_^

    — Mattias

    • Galv says:

      This script is to make things respawn on a timer. If you want to make things respawn when you leave the map, you could use normal switches instead of a script :)

  14. Radajin says:

    Will you be making a MV plugin for this? I was using this for my crafting respawns but since the conversion it doesn’t work. and i’m not savvy enough to know if i can do what this script used to do in MV by it’ self.

  15. AA says:

    I was testing this plugin today and noticed first that:
    will not stop my timer at 0 seconds.

    Instead, if I want to make it 0, I have to use something like:

    A little bit later, while querying for
    var timeLeft = this.respawnTime(0,0);

    I’ve noticed that timeLeft goes negative… so is not really a time left, it looks more like a delta which could go negative also.

    Is that the expected behaviour or the time is supposed to stop at 0 while it counts down?

    • Galv says:

      Technically they aren’t timer and do not ‘count down’. They check the current time with the time they are registered to end and only do something when they are told to (from within the move route for example). So yes, they will go into negative.

  16. Tsar CUBE says:

    Hey I’m trying to use this in a farming system for growing crops. It works great so far but… Is it possible to ADD time to the timer? Like for example if a person goes to sleep for a few hours in the game? My Day/Night cycle works of variables but I can change that if its required to make the script work. Basically how do I “fast-forward” the timer for all events on a given map? Is that possible?

    • Galv says:

      The plugin works on playtime. The script calls for ‘modEventTimers’ allows you to modify event timers, you will need to use that whenever you ‘fast forward’ time.

      • Tsar CUBE says:

        Thank you for the reply! I tried using the line “modEventTimers” in a script call but got an error saying “undefined method” for game interpreter. I took a look through the script but saw no similar script calls in it. I am pretty much a noob as far as scripts are concerned though. Is there any chance you could give me an example of the syntax for this call? I am using RPG Maker VX ACE (Not MV) by the way, in case it makes a difference. :)

      • Galv says:

        Ah, sorry – I mentioned MV plugin functionality without thinking it was VX Ace script. Unfortunately I didn’t include that in the VX Ace Script.

      • Tsar CUBE says:

        Ah, I see. That’s a bit unfortunate :(
        I messed around a bit with it and managed to switch it from using “play time” to using parts of Vlue’s advanced time script instead to base its timers of. To my surprise it seems to work with it O_o.

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s