- Joined
- Feb 22, 2016
- Messages
- 1,626
- Reaction score
- 1,195
- First Language
- English
- Primarily Uses
- RMMV
So I have this line of code and it runs perfectly:
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:

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:
So my question is: What do I use instead of
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...
$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:

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);
};
$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...







