RPG Maker Forums

So I have this line of code and it runs perfectly:$gameActors.actor(1).getTreesPoints(skillTree);

It returns the value for the current amount of free SP (skill points) actor 1 has available. However, I need to make it so that it grabs the amount of SP for actors 2 & 3 accordingly. This is what it looks like atm:
1594455351064.png

If I had a 2nd or 3rd actor in the party, they would simply show the amount of SP of actor 1 instead of their own. This is the code I added in YEP_JobPoints to obtain the result in the screenshot:
JavaScript:
Window_Base.prototype.drawActorJp = function(actor, id, wx, wy, ww, align) {
    var jp = actor.jp(id);
    var icon = '\\i[' + Yanfly.Icon.Jp + ']';
    var fmt = Yanfly.Param.JpMenuFormat;
    var sp = $gameActors.actor(1).getTreesPoints(skillTree); //Shows actor's available Skill Points
    var text = fmt.format(Yanfly.Util.toGroup(jp), Yanfly.Param.Jp, icon) + '  ' + sp + '\\i[157]';
    if (align === 'left') {
      wx = 0;
    } else if (align === 'center') {
      wx += (ww - this.textWidthEx(text)) / 2;
    } else {
      wx += ww - this.textWidthEx(text);
    }
    this.drawTextEx(text, wx, wy);
};
So my question is: What do I use instead of $gameActors.actor(1).getTreesPoints(skillTree); so that it targets the corresponding actors like how JP (job point) does?

I haven't figured out how JP targets the corresponding actor to get their current JP, but however it does it, I need to do it for SP as well...

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top