Event Switch Workaround

So... I know there have been various topics on this, but I'm still not sure the best way to do what it is I'm trying to accomplish.

I'm working on a game with a Day/Night cycle (LTN). During the day, zombies are not on screen and you're safe to wander around. However; once night happens, the zombies spawn and walk the map. I have the actual zombie sprites walking around with Yanfly's EventChasePlayer plugin where battle happens once they touch you.

I have my zombie event set up with three pages:
  • Page One: Zombie Unspawn Switch ON - No scripting on this page, set to through and no zombie sprite in the Image box.
  • Page Two: Zombie Spawn Switch ON - Zombie in Image box and shows up on map. Moves around at Random.
  • Page Three: Self Switch A - This happens if the player encounters the zombie and wins the battle. This page turns zombie off.
This issue I'm having is that it starts on Page One. Night falls and Zombie Spawn Switch gets turned on and it moves to page 2. Assuming you don't defeat the zombie, when day happens and Zombie Spawn Switch is turned OFF and Zombie Unspawn Switch is turned ON... it doesn't go back to Page One. I already know you can't do this in the current system.

Any ideas how I can accomplish this? Zombies spawn during the night. Unspawn at day. Then spawn again at night. Continue cycle until zombie is defeated.

I tried a conditional formula with a parallel process... but it didn't work for me. Any ideas?
Wouldn't it be easier if you had it set up something like this?

  • Page one has no switch condition and no image
  • Page two is activated by a switch that is turned on at night, making the zombie spawn.
  • Page three stays the same (self switch and no image)
This way, when it turns to day time, the night switch is turned off and the zombie "despawns" until it's night again. Having two different switches to spawn and despawn probably confuses the engine.
Wouldn't it be easier if you had it set up something like this?

  • Page one has no switch condition and no image
  • Page two is activated by a switch that is turned on at night, making the zombie spawn.
  • Page three stays the same (self switch and no image)
This way, when it turns to day time, the night switch is turned off and the zombie "despawns" until it's night again. Having two different switches to spawn and despawn probably confuses the engine.

Yeah, I forgot to put that the first time I tried creating the event, that's what I did. No switch on Page One...but once it goes to page 2 with the Zombie Spawn switch at night... even if I turn that switch off... it doesn't go back to Page 1. I don't think there's a current way to get events to go backwards to previous pages... unless there's a script out there... I tried implementing the other switching, hoping it would force it back to page one...but it doesn't :-(

*PROBLEM FIXED* I went in and did what you said (trying it again). I was certain I did that the first time, but apparently I had something wrong and overlooked it.

I put Page One to no switch and it's a blank page. Page 2 has my Zombie Spawn=ON switch. I just turn the switch off once day hits... and they disappear. Not sure what I did wrong the first time.

Thanks again for your help. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/event-switch-workaround.81847/