MZ How to get current CP/JP from actor?

Hello,

i use the Class Change System VisuStella MZ plugin and managed to make a system work, where i can level my classes via CP. My problem is that i can't manage to find the CP value of my actors which makes it possible to level again even if there are no CP left.
Does anyone know how to get those via a call? I tried several things without any success.

My best hint so far is this:
this.drawActorClassPoints(actor, classID, x, y, width, align);
* - The 'actor' variable references the actor to get data from.
* - The 'classID' variable is the class to get data from.
* - Use 0 if Class Points aren't shared or if you want the Class
* Points from the actor's current class.
* - The 'x' variable refers to the x coordinate to draw at.
* - The 'y' variable refers to the y coordinate to draw at.
* - The 'width' variable refers to the width of the data area.
* - Replace 'align' with a string saying 'left', 'center', or 'right' to
* determine how you want the data visibly aligned.

Which is how the menu works if i read that correct. I tried several alterations...

Any help would be highly appreciated!

THanks and have a nice day!
Unfortunately, the script call you quote has nothing to do with the data you're trying to get.

That's to print (draw) the class points in a window, it isn't helpful for retrieving them in a numeric format.

You could try opening up the developer console and inspecting the data structure of one of your actors, see if you can find it...but it may use an obfuscated name, which means you won't know it's the correct property unless you can match the value to what you see their class points are in the game.

Or you could contact VisuStella support, see if they'll provide you with the name of the Game_Actor property.
Thanks for the fast reply. I actually finally found it myself:
$gameActors.actor(1).getClassPoints(1);

Now i'm trying to figure out how to get the secondary class ID. But i'm so happy that i'm finally making progress 🙂
I'm slowly starting to grasp rpg maker mz and the possibilities!
For anyone encountering similar problems:

$gameActors.actor(1)._multiclasses[1];

all class IDs are stored in the multiclass array. Where 0 is class tier 1, 1 is class tier 2, 2 is class tier 3, ...

Thanks again for the tip with dev console!
Now i can't set/raise the level for secondary class anymore... one problem solved and another arises xD

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-current-cp-jp-from-actor.159765/