Having a dialog only appear once

I would like it to make it so as soon as i use a specific door and i enter the new room, a dialog appears one of those "show text" elements but I'm having some trouble making it only show the dialog once, so far it shows it everytime I enter the room.
Make a switch and name it something like "Door open". Edit the door even and create a new event page. Set it's conditions to switch on and select the "Door open" switch. Back on the first page after everything else happens have the event turn on the switch.
Make a switch and name it something like "Door open". Edit the door even and create a new event page. Set it's conditions to switch on and select the "Door open" switch. Back on the first page after everything else happens have the event turn on the switch.



Thank you I ended up copying the code over, without the dialog on a secound page and using a selfswitch instead

Original thread: https://forums.rpgmakerweb.com/threads/having-a-dialog-only-appear-once.65349/