it might work, but you need to make it a bit longer than selfswitches, because it doesn't say which selfswitch,
$gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'A'], true);
That code might work, but you also need an A switch active and do things, and if you need to revert it back
you use the following
$gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'A'], false);
But Idk if you want something of its only the same event or in multiple maps.
But I hope you can achieve what you need though =)
But self switch can also be activated by a moveroute and simply use SelfSwitch command ON.
@Bex you just got me first D: