Hey guys, I'm trying to create a skill with a unique effect in my game. It's a skill that automatically applies a state when used, but only if the player has a specific piece of armor equipped. For example, a specific buff that only triggers for that skill. I'm having a hard time getting it to work—could someone help me write the code for the skill's notetag?
Need help Creating Skill That Applies a State Only With Specific Armor Equipped
RPG Maker MV Supportyou need to give it a bit more detail to be able to do it with code:
is the state to be applied to the skill user or some other target?
is the target or the user supposed to have the armor equipped?
as a general no-code way you could do it by thinking backwarts:
have the state always be applied, but give all other armors than the one required an "immune against state" trait.
is the state to be applied to the skill user or some other target?
is the target or the user supposed to have the armor equipped?
as a general no-code way you could do it by thinking backwarts:
have the state always be applied, but give all other armors than the one required an "immune against state" trait.
Sorry for not explaining myself clearly before. What I'm trying to do is basically something like this in a skill's notetag:
<Before Eval>
if (user is equipped with armor X) {
user.addState(X);
}
</Before Eval>
The part I care about is the conditional—the part that checks whether the user has a specific armor equipped.
<Before Eval>
if (user is equipped with armor X) {
user.addState(X);
}
</Before Eval>
The part I care about is the conditional—the part that checks whether the user has a specific armor equipped.
I think you can use this:
Code:
user.hasArmor($dataArmors[X])
Original thread: https://forums.rpgmakerweb.com/threads/need-help-creating-skill-that-applies-a-state-only-with-specific-armor-equipped.181309/