Linking my TP amount to a game variable?

Uranium

Game Dev, Pixel Artist
Veteran
Joined
Jan 13, 2017
Messages
134
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
551
Reaction score
788
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
39,949
Reaction score
13,585
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

Ok i got the model New and I will develop a little more, I think my SV is not beautiful yet.
"I, Giorno Giovanna, have a dream". In all seriousness, spatial BGM feature is now complete for my audio plugin.
Stream will be live shortly with some game development followed by the return of the Interactive Text Adventure after a short hiatus! Feel free to drop by!
Lately, I've taken to smashing random nouns/verbs together as insults. It's sort of amusing how many people don't really know how to respond to that. You bottle shaker!
Would be nice to pick color code that is not exclusively for message event

Forum statistics

Threads
103,243
Messages
998,317
Members
134,734
Latest member
Avaross
Top