Check target state

I've made a code that worked but i erased it by mistake but it was something like

BattleManager._targets.isStateAffected(33)

Is there a problem ? It doesn't seems to work.
where did you use whatever you did?
BattleManager._targets is an array. that function wouldnt work without you either specifying a battler within it, or you using something other than BattleManager._targets
where did you use whatever you did?
BattleManager._targets is an array. that function wouldnt work without you either specifying a battler within it, or you using something other than BattleManager._targets
I used it in a skill common event, to modify the effect depending on the state of the target.
Like i said, i deleted old common event that had similar code (that worked) but i don't remember them anymore 🙁
was the skill single target?
if what you had worked before, then it might have been
Code:
BattleManager._targets[0].isStateAffected(33)

that being said, there are plugins that let you do exactly what you want easily without having to use common events. like this one
was the skill single target?
if what you had worked before, then it might have been
Code:
BattleManager._targets[0].isStateAffected(33)

that being said, there are plugins that let you do exactly what you want easily without having to use common events. like this one
Worked like before, i think i just forgot [0], i might see the plugin if there are more problem in the future.
Thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/check-target-state.171733/