MV Check whether a certain event's self switch is ON via Script Call

Haven't found anything so I had to guess. Nothing worked so far.

P.S. No, I can't use switches or variables instead. It have to be SelfSwithces
1623397224753.png

1623397241222.png
Try putting this into your conditional branch instead:

$gameSelfSwitches.value([MapID,EventID,'Key'], true);

MapID = the ID of the map where the event is placed
EventID = the ID of the event in question
Key = replace Key with A, B, C or D



So in your case, something like this:

$gameSelfSwitches.value([$gameMap._mapId,this.eventId(),'B'], true);


or if you need something specific:

$gameSelfSwitches.value([52,108,'C'], true);
It works! Thank you!
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/check-whether-a-certain-events-self-switch-is-on-via-script-call.137364/