Erase Pictures wont work

I'm trying to replace the menu with a checklist that puts a little X over the items as your progress. Everything is working fine except for the Xs. Even when I set up Erase or $gameScreen.clearPictures(); in the exit event the X stays on the screen.


Video


Spoiler: Common Event for Menu Swap
◆If:MenuControllerStart is ON
◆Change Transparency:OFF
◆Control Switches:#0001 MenuControllerStart = OFF
◆Transfer Player:{MapMenuMapID} ({MapMenuPlayerX},{MapMenuPlayerY})
◆
:Else
◆Control Variables:#0002 MapMenuPlayerX = Map X of Player
◆Control Variables:#0003 MapMenuPlayerY = Map Y of Player
◆Control Variables:#0001 MapMenuMapID = Map ID
◆Transfer Player:Checklist (15,11)
◆
:End

Spoiler: Putting the X on the list
◆If:Milk is ON
◆Show Picture:#2, x, Upper Left (48,240), (100%,100%), 255, Normal
◆Erase Event
◆
:End
◆Erase Event

Spoiler: When hitting Escape
◆If:Script:Input.isTriggered('cancel')
◆Change Transparency:OFF
◆Control Switches:#0001 MenuControllerStart = OFF
◆Transfer Player:{MapMenuMapID} ({MapMenuPlayerX},{MapMenuPlayerY})
◆Erase Picture:#2
◆
:End
Try putting the erase picture above the transfer player.
Try putting the erase picture above the transfer player.

Ah that seemed to fix it. Thank you! :>
going to a new map deletes the events on the previous map. sometimes the commands below the transfer get executed before they are deleted, but that is not something you can count on as a lot of times the map event is deleted before that.

Original thread: https://forums.rpgmakerweb.com/threads/erase-pictures-wont-work.134338/