I initially posted about this issue here, but I am having my doubts that it is an issue to do with the script(s) used:
http://forums.rpgmakerweb.com/index.php?/topic/48848-ace-proximity-events-keep-retriggering/
Now, when you're running a parallel event that activates a battle upon proximity 1 to the player (as per the script used) one will activate, then a second event - a second battle - will also activate, if it activates at the exact right time. This causes the game to be thrown into an infinite loop whereby even if you win battle 1, battle 2 gets processed, then battle 1's victory processing (specifically, events set up to occur after battle) never goes through.
So I have here a conundrum.
When making common events, you cannot use "erase event" as per normal, since that just erases the common event. You have to use the self-switch commands (which is weird, considering erase event should also work in this context if self-switches do, but nevertheless...) to go to another page of the event to cause it to erase itself.
Now, because common events don't work as I'd like them to, this puts me in a bit of an awkward situation. I could re-event the entire map of encounter events to erase themselves, thereby hopefully avoiding the common event queue situation, as well as probably implementing a completely different proximity event script that doesn't require PP. I have tested without the use of common events, and battles seem to clear and activate just fine...
However, this means such encounters are not so easily tweaked.
How would one implement an on-touch, proximity-based encounter system? (Essentially, I don't want approach to occur until the player is within X tiles of the encounter)
The best way I have had it to work so far is by simply utilizing an event touch rather than the proximity script on proximity 1, but the default event touch is terrible, as there is a huge delay before the event "touches" you properly. As in, it has to be on a tile next to you and actually moving toward you to register as a touch. Even that is very sporadic in whether it works or not.
Still, it is the most reliable way I've found so far that doesn't trigger infinite loops.
Is there a way to improve the event touch processing so that there isn't such a huge lag in its actual process (hence why I was using proximity 1 from the script earlier as a battle condition) and yet utilize common events, or am I SOL with parallel processes and common event interruptions?
(I'm happy to provide a demo with the common event interruption as an example if required)
http://forums.rpgmakerweb.com/index.php?/topic/48848-ace-proximity-events-keep-retriggering/
Now, when you're running a parallel event that activates a battle upon proximity 1 to the player (as per the script used) one will activate, then a second event - a second battle - will also activate, if it activates at the exact right time. This causes the game to be thrown into an infinite loop whereby even if you win battle 1, battle 2 gets processed, then battle 1's victory processing (specifically, events set up to occur after battle) never goes through.
So I have here a conundrum.
When making common events, you cannot use "erase event" as per normal, since that just erases the common event. You have to use the self-switch commands (which is weird, considering erase event should also work in this context if self-switches do, but nevertheless...) to go to another page of the event to cause it to erase itself.
Now, because common events don't work as I'd like them to, this puts me in a bit of an awkward situation. I could re-event the entire map of encounter events to erase themselves, thereby hopefully avoiding the common event queue situation, as well as probably implementing a completely different proximity event script that doesn't require PP. I have tested without the use of common events, and battles seem to clear and activate just fine...
However, this means such encounters are not so easily tweaked.
How would one implement an on-touch, proximity-based encounter system? (Essentially, I don't want approach to occur until the player is within X tiles of the encounter)
The best way I have had it to work so far is by simply utilizing an event touch rather than the proximity script on proximity 1, but the default event touch is terrible, as there is a huge delay before the event "touches" you properly. As in, it has to be on a tile next to you and actually moving toward you to register as a touch. Even that is very sporadic in whether it works or not.
Still, it is the most reliable way I've found so far that doesn't trigger infinite loops.
Is there a way to improve the event touch processing so that there isn't such a huge lag in its actual process (hence why I was using proximity 1 from the script earlier as a battle condition) and yet utilize common events, or am I SOL with parallel processes and common event interruptions?
(I'm happy to provide a demo with the common event interruption as an example if required)