Hello, looking for some help with a notetag from YEP_SkillCore:
For context; I want to create a skill that purges all "positive" states from an enemy.
This is the framework I have been working with:
This worked in terms of removing EVERY state.
Obviously, I need a way to filter out any states that are not "positive".
My first approach was using metadata:
Note: All my positive states would be tagged with " <positive:1> "
But for some reason, it did not detect the metadata and just proceeded to remove every state
Note2: I also tried putting the 1 in the condition in quotation marks "1".
Then I tried using inherent data of states, in this case their "priority" parameter.
Note: All my positive states would have their priority set to 8
But this did not work either.
So, is there something I did wrong or just missed?
Also, if there is a better way to approach a skill like this, please let me know.
For context; I want to create a skill that purges all "positive" states from an enemy.
This is the framework I have been working with:
JavaScript:
<After Eval>
let stateList = target._states;
for (i=0; i<stateList.length; i++) {
target.removeState(stateList[i]); i-=1;
}
</After Eval>
This worked in terms of removing EVERY state.
Obviously, I need a way to filter out any states that are not "positive".
My first approach was using metadata:
JavaScript:
<After Eval>
let stateList = target._states;
for (i=0; i<stateList.length; i++) {
if (stateList[i].meta.positive === 1) {continue;} else {target.removeState(stateList[i]); i-=1;}
}
</After Eval>
Note: All my positive states would be tagged with " <positive:1> "
But for some reason, it did not detect the metadata and just proceeded to remove every state
Note2: I also tried putting the 1 in the condition in quotation marks "1".
Then I tried using inherent data of states, in this case their "priority" parameter.
JavaScript:
<After Eval>
let stateList = target._states;
for (i=0; i<stateList.length; i++) {
if (stateList[i].priority === 8) {continue;} else {target.removeState(stateList[i]); i-=1;}
}
</After Eval>
Note: All my positive states would have their priority set to 8
But this did not work either.
So, is there something I did wrong or just missed?
Also, if there is a better way to approach a skill like this, please let me know.