Can wearing or taking off equipment turn on or off a switch

Hey all! Question - can I make it so putting on or taking off a piece of equipment toggles a switch? For example, I want the switch "0022:Wearing Guard Outfit" to be "ON" when the player is wearing the "Guard Chestplate" and "OFF" when they're not wearing it.

So I currently have a few guards with patrol patterns (that attack the player) on the first event page. I want their second event page to be activated when 0022: Wearing Guard Outfit is ON. When 0022: Wearing Guard Outfit is ON, the guards won't attack and will just talk to the player.

Just wondering how to go about this? Or if there's a wiser way to go about it? I'm making a scene were the player has to escape a location. The players can sneak out, carefully avoiding the guards or if they find the guard outfit, they can just walk out. Then there's a third option, the player releases some monsters that kill the guards. That's the idea anyway. Thanks y'all!
I want the switch "0022:Wearing Guard Outfit" to be "ON" when the player is wearing the "Guard Chestplate" and "OFF" when they're not wearing it.
can't you just have the event checking for the switch, checking for the item instead?
it's basically one script call or two, returning true or false, which is the same as checking a switch.
Would this work?
equipmenthelp124656.png
can't you just have the event checking for the switch, checking for the item instead?
it's basically one script call or two, returning true or false, which is the same as checking a switch.
If you mean using the condition "Item "X" exists", that only works with non equip-able items, unfortunately. Unless you meant what Bex said below.
I'm dumb, I didn't see that option but thought it had to exist. Thank you. Yeah, I think this could work.
the solutions given above require either checking at specific events, or a parallal process taking up processor time.
the third option would be to use a script that executes a common event on equip.

once on a time several such scripts did exist, but I don't know if they are still available as many ace websites are down. You might want to search for them if the solutions above don't work.
tsukihime and yanfly might be a good point to start looking.
Here's my solution for VX ACE:

EDIT

Actually, I noticed I still needed to make more changes to my code so wait till this thread is approved by a moderator to get the final version.

Original thread: https://forums.rpgmakerweb.com/threads/can-wearing-or-taking-off-equipment-turn-on-or-off-a-switch.155249/