Simple script call, Add TP

So, 2 quick things,


I think this is just a simple script call, but i was wondering how to give your player + 2 TP or whatever outside of battle.


And i also need a variable to equal the players TP as well.. 


Thank you for any support you can give me with this.. I hope it's just 2 simple lines of code
Yup, it is indeed 2 simple lines of code: 


$game_actors[n].tp += 2


and 


$game_variables[v] = $game_actors[n].tp ( or, to get the party leader's tp, $game_variables[v] = $game_party.members[0].tp )


Replace v with the variable you want to set, and n with the Actor ID whose TP you want to measure/change.
To put an actor's TP into a variable:


Control Variables > Script: $gameActors[id].tp


where id is the actor id without leading zeros.


To increase an actor's TP:


Script: $gameActors[id].tp += 2


You would have to have Preserve TP set for the actor.
Shaz's approach is good but the syntax is wrong for VX Ace (I think that's MV syntax) - use $game_actors not $gameActors.
lol - yeah, I forgot that.  Helping too many people 😀   AND I just noticed you pipped me anyway.
Thank you so much everyone ^.^

Original thread: https://forums.rpgmakerweb.com/threads/simple-script-call-add-tp.64199/