Event commands are handled through an event interpreter instance (
Game_Interpreter
). Most events run through the main interpreter, defined on
$gameMap
, which persists from one map to the next. However, a Parallel event runs through an interpreter that is defined on itself.
When changing from one map to another, all events from the previous map (including common events) are cleared. For Parallel events, this means their interpreters are also cleared, which makes them stop immediately.
When arriving on a new map, events are set up via the
Game_Map.prototype.setupEvents
method. Parallel common events events are stored in the map's
_commonEvents
array, specifically lines 5553~5555 (rpg_objects.js):
JavaScript:
this._commonEvents = this.parallelCommonEvents().map(function(commonEvent) {
return new Game_CommonEvent(commonEvent.id);
});
It might be safe to move that part to
Game_Map.prototype.initialize
to avoid the reset on map change? I haven't looked into it in depth, though; that might cause problems.
