How to Script Call party members in Battle?

Hello, I am having some issues on how to script call the current party member taking an action. I am using Yanfly's Action Sequence Pack 2, and am trying to make the following occur.

-Before an attack occurs, the game should display an image depending on the character.

-Therefore, I am trying to make an if statement where the condition is the current actor.

Am I using the correct script call? Because when tested in game, the line of text does not appear, but the common event after it does.
= is an assignment, not a comparison.

you either need == or === depending on what exactly you want.
can't tell if the code itself is the correct function, but test it with === again.
I think you're making this more complicated than you need to. If you're already using action sequences, why does this need to be outsourced to a common event?

Action Sequences already provide you with the point of reference of user

So you can simply do, inside your action sequence,
Code:
if user.actorId()==1
    other action sequence commands, even calling a common event here if you need to
    but you could always use the eval command to use the script call for showing an image
    so I don't see why you'd need to take up common event slots for this
end


you either need == or === depending on what exactly you want.
For every situation that I've seen regarding RPG Maker, == is fine. === is when you want to ignore JavaScript's automatic type converting (e.g. 2 == "2"), but RPG Maker's default functions are designed to keep data types consistent.
I think you're making this more complicated than you need to. If you're already using action sequences, why does this need to be outsourced to a common event?

Action Sequences already provide you with the point of reference of user

So you can simply do, inside your action sequence,
Code:
if user.actorId()==1
    other action sequence commands, even calling a common event here if you need to
    but you could always use the eval command to use the script call for showing an image
    so I don't see why you'd need to take up common event slots for this
end



For every situation that I've seen regarding RPG Maker, == is fine. === is when you want to ignore JavaScript's automatic type converting (e.g. 2 == "2"), but RPG Maker's default functions are designed to keep data types consistent.
I figured it out, thanks so much! Needed to use ==.
= is an assignment, not a comparison.

you either need == or === depending on what exactly you want.
can't tell if the code itself is the correct function, but test it with === again.
== is the one that works, thanks for helping!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-script-call-party-members-in-battle.155470/