Hey guys,
I'm trying to find a script call to turn off all self switches for all events on a specific map.
I guess I could do something like this:
But this way I would have to type in every event Id, which is quite a lot for some maps. There has to be a way to say "Ids 1 to 100" or "all" right?
Thanks in advance 🙂
I'm trying to find a script call to turn off all self switches for all events on a specific map.
I guess I could do something like this:
Code:
var mapId = this._mapId;
var eventIds = [1, 2, 3];
var switchIds = ['A', 'B', 'C', 'D'];
eventIds.forEach(function(eventId) {
switchIds.forEach(function(switchId) {
$gameSelfSwitches.setValue([mapId, eventId, switchId], false);
});
});
But this way I would have to type in every event Id, which is quite a lot for some maps. There has to be a way to say "Ids 1 to 100" or "all" right?
Thanks in advance 🙂