Local variable in event?

Hi, I would like to know if there is a code that allows events to create local variables within the event itself? Something like this.event.variablename = 0 which I put inside an event.
Reason: I would like to create an event that will stop moving after it has been triggered more than 3 times. Instead of creating individual variables, I would like the event itself to keep track of it's own variable because I might create 100 events like this. Does that mean I have to create 100 variables just to keep track of it's number of triggers? Hope this is not confusing.
It's called self-variables and there are plugins that provide those functions.
isn't quite as easy as simply adding them because the values need to be saved as well, but those plugins take care of that.
I would like to create an event that will stop moving after it has been triggered more than 3 times.
If they're all using low values like this, you could also use the built-in self-switch functionality. For example:
Page 1 - no conditions, when it's triggered it turns on Self Switch A
Page 2 - condition of Self Switch A, event code copied from page 1, change the bottom to turn on Self Switch B
Page 3 - condition of Self Switch B, event code copied from page 1, change the bottom to turn on Self Switch C
Page 4 - condition of Self Switch C, doesn't move anymore

That's pretty simple to copy and modify (like, 30 seconds or less). But if you need the self switches on that same event for something else, or you need to track more things than the number of switches allow, the self variables plugins are the way to go.
I'm pretty sure that Eliaquim has a self variable plugin. VisuStella Events and Movement Core also has that functionality.
It's called self-variables and there are plugins that provide those functions.
isn't quite as easy as simply adding them because the values need to be saved as well, but those plugins take care of that.
Thanks for giving me the right name. Was thinking what to search and most of my search terms gave wrong answers.

If they're all using low values like this, you could also use the built-in self-switch functionality. For example:
Page 1 - no conditions, when it's triggered it turns on Self Switch A
Page 2 - condition of Self Switch A, event code copied from page 1, change the bottom to turn on Self Switch B
Page 3 - condition of Self Switch B, event code copied from page 1, change the bottom to turn on Self Switch C
Page 4 - condition of Self Switch C, doesn't move anymore

That's pretty simple to copy and modify (like, 30 seconds or less). But if you need the self switches on that same event for something else, or you need to track more things than the number of switches allow, the self variables plugins are the way to go.
Ya, I started off using this method but I also happen to need self switches for other parts of the event, so this method didn't work.

I'm pretty sure that Eliaquim has a self variable plugin. VisuStella Events and Movement Core also has that functionality.
Thanks. I'm already using VisuStella Events and Movement Core and didn't realise this function exist. Thanks.
Hi all, VisuStella plugin works. Not 100% understand how it works but it just works. Thanks all for the pointers.

Original thread: https://forums.rpgmakerweb.com/threads/local-variable-in-event.151438/