Issues changing self switch with autonomous movement

I know this has been answered in numerous other threads that I have googled, but I swear to god it isn't working for me and I'm stumped as to why:
1728501943380.png



I've tried it with $gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'B'], false); and have the same non-response.

Event moves fine, and continues to trigger as if B is on, so it's not freezing or anything.

Any ideas greatly appreciated.
Why not just use the command Self switch B off after the movement is done?
I want the trigger of the event to be on contact with the player IE the enemy catches you and starts a fight. The self switch is if the enemy has chased you for a while and gives up.
Ah event chasing a player.

Try this. It's free and easy to set up.

I know this has been answered in numerous other threads that I have googled, but I swear to god it isn't working for me and I'm stumped as to why:
View attachment 320062


I've tried it with $gameSelfSwitches.setValue([$gameMap.mapId(), this.eventId(), 'B'], false); and have the same non-response.

Event moves fine, and continues to trigger as if B is on, so it's not freezing or anything.

Any ideas greatly appreciated.
Assuming the map and event IDs are correct, you have an error - you are missing a square bracket in the photo you sent: - here is the corrected version:
JavaScript:
$gameSelfSwitches.setValue([9, 33, 'B'], false)
LOL honestly I was considering messaging you on discord but I thought that would be too stalkery.

It turned out I was referencing the map tileset rather than the map ID which is about as stupid as I would expect. Thanks for the confirmation on the syntax.
Just in case you'd find it useful, there's this plugin which provides several shorthand options for scripts like this.

Original thread: https://forums.rpgmakerweb.com/threads/issues-changing-self-switch-with-autonomous-movement.172494/