issues with npc movement during cutscene

ok so i have this granny npc with a custom route, there is a cutscene with her but i can't seem to make her route stop,, i used a "wait" command for 999 frames but if the player stays on the cutscene a bit longer, at one point she'd just do her route again,, what do i do to stop her custom route for this cutscene?

here's a screenshot :

Screenshot 2023-06-26 020914.png
Have your cutscene event turn on the Granny event's self switch to A which should be a blank page. Put this command in the cutscene event
$gameSelfSwitches.setValue([mapNumber, grannyEventNumber, 'A'], true);

Then when the cutscene is over turn the self switch off with
$gameSelfSwitches.setValue([mapNumber, grannyEventNumber, 'A'], false);
@AquaEcho thanks! although i did put the commands it said it wasn't identified, i assumed i had to change it like this :

Screenshot 2023-06-26 024922.png


and i did the same to the other command, but it still shows the same error, what am i doing wrong?
mapNumber and grannyEventNumber need to just be numbers, e.g. 1, 3
thank you so much !! i also overlooked some other stuff so that's why it didn't work lol, but now it does 🙂 thanks again !

Original thread: https://forums.rpgmakerweb.com/threads/issues-with-npc-movement-during-cutscene.158692/