Yanfly Battle Core: If user.class_id == ?

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
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>
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,816
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
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.
 

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
Do you... know where I could look it up? I'm kind of a beginner at scripting.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
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>
 

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
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!
 

Latest Threads

Latest Posts

Latest Profile Posts


I ended up needing to do a chapter one world map remake. It's still WIP but coming along nicely. =D
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

1st iteration on castle interior in Tiled.
I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.

Forum statistics

Threads
107,744
Messages
1,031,822
Members
139,883
Latest member
DeAngelis
Top