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
481
Reaction score
227
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
481
Reaction score
227
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

I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.
Ever notice that villains can reform and become better people, but heroes can only ever die... or live long enough to see themselves become villains?

Isn't that interesting?

Forum statistics

Threads
129,844
Messages
1,205,659
Members
171,001
Latest member
OliguS
Top