- Joined
- Jul 22, 2018
- Messages
- 183
- Reaction score
- 37
- First Language
- Italian
- Primarily Uses
- RMMV
how do i check for multiple states without flooding note space of a state?
With my frozen state i'm checking if the battler have one of my other states, then removing it
this is a template i made:
<Custom Apply Effect>
if (target.isStateAffected(2) === true){
target.removeState(2);
}
if (target.isStateAffected(4) === true){
target.removeState(4);
}
if (target.isStateAffected(5) === true){
target.removeState(5);
}
if (target.isStateAffected(6) === true){
target.removeState(6);
}
if (target.isStateAffected(7) === true){
target.removeState(7);
}
if (target.isStateAffected(8) === true){
target.removeState(8);
}
if (target.isStateAffected(9) === true){
target.removeState(9);
}
if (target.isStateAffected(10) === true){
target.removeState(10);
}
if (target.isStateAffected(12) === true){
target.removeState(12);
}
... and so on.
since no all states from 1 to max are noted, i need a compacted version that allow me to custom select the ids.
</Custom Apply Effect>it's so ugly and long, i need something better than this and I'm still learning javascript.
Any help is appreciated.
With my frozen state i'm checking if the battler have one of my other states, then removing it
this is a template i made:
<Custom Apply Effect>
if (target.isStateAffected(2) === true){
target.removeState(2);
}
if (target.isStateAffected(4) === true){
target.removeState(4);
}
if (target.isStateAffected(5) === true){
target.removeState(5);
}
if (target.isStateAffected(6) === true){
target.removeState(6);
}
if (target.isStateAffected(7) === true){
target.removeState(7);
}
if (target.isStateAffected(8) === true){
target.removeState(8);
}
if (target.isStateAffected(9) === true){
target.removeState(9);
}
if (target.isStateAffected(10) === true){
target.removeState(10);
}
if (target.isStateAffected(12) === true){
target.removeState(12);
}
... and so on.
since no all states from 1 to max are noted, i need a compacted version that allow me to custom select the ids.
</Custom Apply Effect>it's so ugly and long, i need something better than this and I'm still learning javascript.
Any help is appreciated.
Last edited:

