Checking if actor in slot is state affected, in action sequence

Hi!

I'm trying to figure out how to create an if statement in a YEP motion sequence that checks if an actor in a particular slot is affected by a particular state. I have tried things like:

if $gameParty.members()[2].isStateAffected(4)

But I get the error "Cannot read property 'isStateAffected' of undefined".

Can anyone help me with this?

Cheers!
Do you have 3 members in the party? Remember that $gameParty.members() is an array and starts counting from 0, so this is checking for the 3rd party member. If you don't have 3 members in the party this will happen.
Ah! Thank you so much! The funny thing is I even preemptively told myself I would check the actor index numbering method before I started, and I completely forgot... thanks!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/checking-if-actor-in-slot-is-state-affected-in-action-sequence.115091/