Hello!
Thanks for reading, I hope this is posted in the right place, I'm new to both the forums and RPG VXA ( I do have experience with rpg2000 for playstation, but that was many moons ago. Many, many moons...)
I have a game with visible Mob encounters, and once they are defeated, they turn into a invisible uninteractable event with a 999 wait cooldown before they "respawn" becoming visible and available to interact/fight with again. This is all fine and how I want it to act.
My problem is, When I leave said area, I want the mob respawn timers to either A: Immediately reset the mob back to fight ready mode... OR B: allow the wait timers to continue counting down when im in another zone. Im sure there is an easy way (with or without extra script) to do this and im overcomplicating things, my brain just isn't coming up with the solution today...
Any help or suggestions is much appreciated!
Actually there's no easy way as events do not run when you are off the map. So the wait timer cannot run while you are in another zone by default.
The only way I know to do this is to do option A which will require you to reset the self switch for each and every event when you enter the map. I know there's script code for it but I don't know it off the top of my head, but if you put that code in a parallel process which runs when you enter the map it should reset all of the events when you enter the map. Just be sure to turn off the parallel process too else it will always reset your events!
You could just use Erase Event instead of turning on a self switch, and then the mobs will reset when you leave the map and come back. They will not reset while you're still on the map.
The only way to use a second event page and have the timer count down while you're on another map AND reset while you're on the current map, is a script that will allow you to set a timer for each event.
Thanks to all for the help and suggestions!
I think I'm getting ahead of myself with this, so I am going to side table this issue until I feel more comfortable in general. I was hoping there was an easy work around that I simply was missing, ( I was trying to use a switch activated when transferring out of an area to reset the mob event back to it's page 1, but evidently this does not work. I assume because it can't interrupt the wait timer, but I don't really know) but from what I'm reading, the only real way to achieve what I'm looking for will be with some sort of script/parallel process checking a bunch of variables. I'm simply not good enough yet at making parallel processes and have no clue about writing script per say XD I'm still a noob.
I am gonna check out the links you guys included for new users, at this point I need to become more fluent in basics like parallel processes and variables. Very much enjoying Rpgmaker again!! Glad it has not only survived but flourished!!
No, you could use a switch, but whether it works or not depends on what you do with it. If you want to go that way and need more help, post a screenshot of your monster event (all pages), and one where you turn the switch on and turn it off again.
Also give us an idea of how many of these monsters you might have on a map, and whether you're using the same switch to reset all of them.
because you can't know which events are queued for update, on which map, at any given moment.
the player would just play, and send events to the queue for update, which is always going to be greater than 1.
what happens if there's one event queued for cooldown and the player sends another one to the line?
the second event will never update until the first one is clear.
the more the player interacts with events and sends them to respawn, the more time it takes for the whole array to finish respawning!
that's not how respawn works! if you have a 10 second delay for respawn, you have 10 seconds after the first event is sent for respawn, and 10 seconds after the second event is sent for respawn as well!
which means, the time ticks for all objects in the queue, not just the first one.