I want to update this code for add a parameter in the pluggin option.
Curently this script run commonevent on map load based on a parameter inside map tag.
I want to add option in pluggin parameter for set a by default commonevent id.
This will be optional and map tag got priority if exist.
I try some stuff but did't seem to work, so I ask you help, that will help me to learn in same time.
The current working code:
Thanks for your help.
Curently this script run commonevent on map load based on a parameter inside map tag.
I want to add option in pluggin parameter for set a by default commonevent id.
This will be optional and map tag got priority if exist.
I try some stuff but did't seem to work, so I ask you help, that will help me to learn in same time.
The current working code:
var DEX = DEX || {};
DEX.MSCE = DEX.MSCE || {};
DEX.MSCE.Scene_Map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function () {
DEX.MSCE.Scene_Map_start.call(this);
var commonEventId = $dataMap.meta.load_event_id;
if (commonEventId) {
$gameTemp.reserveCommonEvent(commonEventId);
}
};
DEX.MSCE = DEX.MSCE || {};
DEX.MSCE.Scene_Map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function () {
DEX.MSCE.Scene_Map_start.call(this);
var commonEventId = $dataMap.meta.load_event_id;
if (commonEventId) {
$gameTemp.reserveCommonEvent(commonEventId);
}
};
Thanks for your help.