MZ Change multiple variables value at once

So the same event IDs but on different maps?
No, multiple event IDs on another map. Like, my player character is on map 18 but I want to change the self switches of a few events from map 25.
For example, you can change the self switch of one event that is located on different map with this script

var key = [25, 20, 'A']
$gameSelfSwitches.setValue(key, false);

But I want to do the same thing for more than one event at once. I hope I manage to explain it.
But the event IDs that you're doing on the other maps won't necessarily be the same as the ones on the others?
But the event IDs that you're doing on the other maps won't necessarily be the same as the ones on the others?
var key = [25, 20, 'A']
$gameSelfSwitches.setValue(key, false);
var key = [25, 21, 'A']
$gameSelfSwitches.setValue(key, false);
var key = [25, 22, 'A']
$gameSelfSwitches.setValue(key, false);

Basically I wanna do this, but with one script call.
That does nothing to answer my question. 😛 That's just setting the same self switch of the same event in the same map to the same value 5 times.
That does nothing to answer my question. 😛 That's just setting the same self switch of the same event in the same map to the same value 5 times.
No, three different events 20, 21 and 22, of map 25. unless I made a mistake in the script.
No, three different events 20, 21 and 22, of map 25. unless I made a mistake in the script.
Did you edit the post? It didn't say that before.

But for that, just replace $gameMap.mapId() in my example with the ID of the external map you want to change the switches for. Everything else will be the same.
Did you edit the post? It didn't say that before.

But for that, just replace $gameMap.mapId() in my example with the ID of the external map you want to change the switches for. Everything else will be the same.
Yep, that's solved the issue. Thanks a lot. 🙂
Did you edit the post? It didn't say that before.

But for that, just replace $gameMap.mapId() in my example with the ID of the external map you want to change the switches for. Everything else will be the same.
Yeah, I pressed enter before chacking my text. Sorry about that. I immediately edited it, though. But I guess you saw it before that. Anyway, thanks again for your help. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/change-multiple-variables-value-at-once.152003/