NOTE: I'm using Yanfly's Equip Requirements script
I've been wrestling with this for hours but I just can't seem to do it.
Basically what I want is to only be able to equip a certain weapon if a specific armor is equipped. I'm decently new to Javascript so I just can't figure it out.
For example, I only want to be able to equip a certain spear when a specific emblem (ID: 2) is equipped to the actor trying to equip the spear.
The Error message for this code is:
Syntax Error
Unexpected Identifier
The code I've been using (which is clearly wrong) is right here:
<Custom Equip Requirement Condition>
if $gameActors.actor(1).equips().contains($dataArmors[2]) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Technically I think this code is checking a specific actor and I really want it to check whoever is trying to equip the weapon, but if that's not possible then I can live without it.
This code is almost working. The problem is it still only checks one actor and even if my armor with the 2nd id is equipped it doesn't allow the weapon to be equipped. There is not error code for this one, but it's still not working, the weapon is grayed out no matter what.
<Custom Equip Requirement Condition>
if ($gameActors.actor(1).armors().id === 2){
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Here is the script I'm using as well.
http://yanfly.moe/2016/02/27/yep-75-equip-requirements/
If you need more info let me know.
Thanks in advance.
I've been wrestling with this for hours but I just can't seem to do it.
Basically what I want is to only be able to equip a certain weapon if a specific armor is equipped. I'm decently new to Javascript so I just can't figure it out.
For example, I only want to be able to equip a certain spear when a specific emblem (ID: 2) is equipped to the actor trying to equip the spear.
The Error message for this code is:
Syntax Error
Unexpected Identifier
The code I've been using (which is clearly wrong) is right here:
<Custom Equip Requirement Condition>
if $gameActors.actor(1).equips().contains($dataArmors[2]) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Technically I think this code is checking a specific actor and I really want it to check whoever is trying to equip the weapon, but if that's not possible then I can live without it.
This code is almost working. The problem is it still only checks one actor and even if my armor with the 2nd id is equipped it doesn't allow the weapon to be equipped. There is not error code for this one, but it's still not working, the weapon is grayed out no matter what.
<Custom Equip Requirement Condition>
if ($gameActors.actor(1).armors().id === 2){
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Here is the script I'm using as well.
http://yanfly.moe/2016/02/27/yep-75-equip-requirements/
If you need more info let me know.
Thanks in advance.