[RMMV] EQUIP REQUIREMENT BASED ON STATE? (YEP EQUIP REQUIREMENT)

Posts

Pages: 1
KrimsonKatt
Gamedev by sunlight, magical girl by moonlight
3326
So I have a mechanic in my game where only characters of certain genders can equip certain equipment. I do this by assigning passive states of each party member/enemy which there are three of: male, female, and other. Thing is is that the YEP Equip Requirement plugin doesn't have a built in feature for requiring a state be active for equip something. (which is weird because YEP Item Requirements has was more options including states) You can have to use javascript for it, which as most people who know me know I'm completely incompetent at. Anyways, here is my code for the custom equip requirements where you must have either state 86 (male) or state 87 (other) in order to equip said item.

<Custom Equip Requirement Condition>
if user.state(86) || user.state(87) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>

Is this correct? Or is there something I need to change? Thanks!

Edit: Edit
Pages: 1