Yanfly Battle Core: If user.class_id == ?

So the idea here is I want a different sequence to play when using a skill if the user happens to be a certain class, which involves making it switch to another class, activate the skill, then switch back.

I've relegated the actual class switching to common events.

Running this as below just has it automatically go to the "else" part of the script even while it is the correct class.

Do I need to write something different next to the if condition?

<target action>

if user.class_id == 13

 animation 54: user

 animation wait: 8

 common event: 3

 wait for animation

 perform start

 motion item: user

 action effect

 action animation: user

 wait for animation

 animation 54: user

 animation wait: 8

 common event: 2

 wait for animation

 perform finish

else

 perform start

 motion item: user action animation: user

 action effect

 wait for animation

 perform finish

end

</target action>
class_id is not valid in MV.  You need to look up the appropriate command.  It's probably something like user.classId() but that is only a guess.
Do you... know where I could look it up? I'm kind of a beginner at scripting.
Try using the following:

Code:
<target action>if user.currentClass().id == 13 animation 54: user animation wait: 8 common event: 3 wait for animation perform start motion item: user action effect action animation: user wait for animation animation 54: user animation wait: 8 common event: 2 wait for animation perform finishelse perform start motion item: user action animation: user action effect wait for animation perform finishend</target action>
Try using the following:

<target action>if user.currentClass().id == 13 animation 54: user animation wait: 8 common event: 3 wait for animation perform start motion item: user action effect action animation: user wait for animation animation 54: user animation wait: 8 common event: 2 wait for animation perform finishelse perform start motion item: user action animation: user action effect wait for animation perform finishend</target action>
Sweet! It worked! Thanks very much!

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-battle-core-if-user-class_id.52627/