Linking my TP amount to a game variable?

Uranium

Game Dev, Pixel Artist
Veteran
Joined
Jan 13, 2017
Messages
135
Reaction score
50
First Language
English
Primarily Uses
RMMV
Hey,

I am trying to link my TP amount to a game variable is this possible?

Ex, I have a stamina setup that has a game variable, I want to have it so my TP amount is linked to my stamina's game variable.
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
556
Reaction score
794
First Language
English
Primarily Uses
RMMV
Could you give me a bit more information about that when you say link?
If you try to hold two variables in a single game variable it'll snap in half.

So, you can definitely store your TP amount in a game variable though.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
How many party members do you have, and do you want them ALL to have that amount of TP?

This function in rpg_objects.js sets up the TP to a random amount at the start of each battle:
Code:
Game_Battler.prototype.initTp = function() {
    this.setTp(Math.randomInt(25));
};
You could change it to this:
Code:
Game_Battler.prototype.initTp = function() {
    this.setTp($gameVariables.value(5));
};
to set it to whatever is in variable 5, but that would make it the same for all actors in your party. And if enemies have tp, it would affect them as well.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top