How to change events after they've been executed?

Hello! I'm very new to RPG Maker MV, and I was wondering if there was a way I could execute a command and have it change? Basically, there's an event where it gives you a sword but I don't want the player to just infinitely get swords so I was wondering if there was a way I could lock it so it's only once? Thanks!
Use a self switch in the event. At the end of the event, set self switch A to on. Then make another page in the same event AFTER the first page with the condition Self Switch A = ON that does something else (or nothing, if you prefer). The new page will take over in the event.

Stuff like this is very important to learn, so I would recommend looking at some of the tutorials in the forum for guidance.
1600570028333.png


It's called a branch.
In this case it's checking if self switch A is ON.
By default all switch / self switch are OFF.
The first time it triggered will branch you to the "else", thus turning ON self switch A.
The condition are then fulfilled that way.
The second time and further it triggered will branch you to the "condition".

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-events-after-theyve-been-executed.127613/