Did you know items and skills have self-switches? [Wrong]

Spoiler: Never Mind
I guess many of you didn't know this, however, you might have used this without realizing this, but items and and even skills have a self-switch. This is how it works:

When using common events, you can trigger events that control, or read out the status of a self-switch. Or with a plugin it can even be a self-variable. Normally those are bound to an event, and when used in a common event, it would be bound to the event that called upon that common event.

But items and skills can trigger common events, too. Those common events can still trigger self switches, which then will be bound to the item or skill that triggered the common events.

So if you tried something like this:
1687956021394.png


If you would add this common event to the effects of an apple, then the first time you ear that apple, you get this message. But the next time you find an apple, it won't show this message.

Having a similar common event for a rubber ball, then when using the rubber ball, it will still run the common event, because its self-switch is still off, even if the apple was used earlier.

Note that if you have stacking items (like 20 apples) then the self switch count for all those items, as long as they have the same ID. So not each apple has their own self-switches.

And there is so many funny things you can do with those self-switches. 🙂

I guess I was wrong? I have no idea how... I used this feature for many things in the past.
I tried with Items, not working in MZ.
MV is not installed at the moment. Do you have any Plugins in your Project that would add such functionality? I mean does it work in an empty new Project?

This Sounds unbelievable, but i would like to know for sure if its real or not, in standard Editor XD.
What the f... I've been testing this in an empty project and did indeed not work.

This is so weird, because I have used this in older projects. I don't understand...
Maybe it was the Self Variable Plugin? In the past there was one that also gave Self Switches and Variables to Actors, maybe it also gave them to the others?
It might be... I was really surprised it didn't work. 😛 haha.
I do use YEP_SelfSwVar.js by Yanfly, so that might have been it.

I feel so stupid now. Hahaha.
The reason this doesn't work is that the self switch event command checks whether the event ID is greater than 0, and a skill/item calling a common event doesn't have an event ID, so the self switch setting itself will never run.

Original thread: https://forums.rpgmakerweb.com/threads/did-you-know-items-and-skills-have-self-switches-wrong.158771/