dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
So I'm trying to create a system where JP can be used to gain experience based on the number input (set to a variable). The issue is I am unable to get the plugin command loseJP to work with a variable. Is there any way this can be done?

http://yanfly.moe/2015/11/13/yep-27-job-points/
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
220
First Language
English
Primarily Uses
RMMZ
Assuming that ClassID isn't important, there's a script that may be more ideal for this. Before I can give an exact function, I need to know more about how the system is supposed to work. Is the experience gained through a skill? An event?
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
The XP gain is via event. I use a number input to set the JP to XP value, check the current JP via script call (which works), but unable to subtract the JP to XP variable from the actor's JP.

upload_2018-3-20_12-26-37.png

upload_2018-3-20_12-29-44.png
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
220
First Language
English
Primarily Uses
RMMZ
Two possible reasons that this could be happening.

First, I don't think the plugin command can discern uppercase from lowercase. The loseJP should be loseJp, which a lowercase p. If that doesn't work, try the second option below.

Second, the plugin reader may not be able to read \v[15] in the plugin command. Replace that with $gameVariables.value(15)

If neither of those work, you may need the script call itself. The basic function is $gameActors.actor(actorID).loseJp(value, classID);
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
$gameActors.actor(1).loseJp($gameVariables.value(15), 1); worked perfectly. Thanks much!

Mods: you may close this thread as it is resolved.
 

Latest Threads

Latest Posts

Latest Profile Posts

5 months and no progression at all, i love me.
1.6 update incoming with quality breakthrough! :kaoluv:

1643254634071.png
I might try the mechanical bull at the fair on Friday... for one of the challenges, if you stay on for two minutes, you win $200. I might give that a try and see if I win--I'm pretty good at holding on to things.
Remaking a more streamlined version of my Remote Move map skill in MZ, just one switch and one variable to handle everything. If you seen the Move skill in Golden Sun before, moving far away items with your mind is pretty cool

MZtestRemoteMove.gif
I don't want to brag or anything but I was entertaining a woman the other night. I told her jokes while she bandaged my foot.

Forum statistics

Threads
118,735
Messages
1,118,358
Members
155,895
Latest member
Flike1963
Top