Linking my TP amount to a game variable?

Discussion in 'RPG Maker MV' started by Uranium, Jul 21, 2017.

  1. Uranium

    Uranium Veteran Veteran

    Messages:
    41
    Likes Received:
    6
    First Language:
    English
    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.
     
    #1
  2. Kino

    Kino EIS Game Dev Veteran

    Messages:
    515
    Likes Received:
    666
    Location:
    United States
    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.
     
    #2
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,123
    Likes Received:
    10,992
    Location:
    Australia
    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.
     
    #3
    Skunk likes this.

Share This Page