Check for nil armor?

I need to be able to make a conditional to see if the player has no armor equipped. Natively, with conditional branches at least, there seems to be no way of doing this. Which is kinda dumb. I there any way I can check if an actor has nothing equipped in a specific slot?


Thanks in advanced.
$gameActors.actor(x).equips()[y] === null


Use this in a Conditional Branch (it will return true if the slot is empty and false if it isn't). Replace x with the Actor ID.


y needs to be replaced with the number of the equipment slot that you want to check. You start counting from top to bottom and you start with 0.


This works perfectly! Thank you.
You're welcome. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/check-for-nil-armor.67828/