Checking TP as a condition.

Hello all!

I am writing today with one simple question....
How the hell can I check TP as a condition. Either via script call, plug-in, or etc?

The reason being, I am working on an Action RPG, and need to check for TP for skills.

I.E If player tp >5 blah blah blah
If player tp<1 disable dash.
if you're talking about the damage formula then it's "a.tp" if it's the user of a skill or item, while it's "b.tp" if it's a target.
However if it's a script call or conditinal branch then:
$gameActors.actor (x).tp where x is the id of a specfic actor or
$gameParty.members()[y-1].tp where y is the postion in the party the member is with the party leader being equal to 1.

You should check out this, it's the script call plugin list and this, which has some good info for basic damage formula stuff, good for skills and items and gives some basic MV JS code too.
You might also be able to use Control Variables to put the TP into a variable (use Game Data), then use the variable in a conditional branch
@Shaz
Can't, game data by default doesn't use player's tp.
@Zarsla if i just did a conditional branch. I.E if $gameActors.actor (x).tp would i be able to use more complex expressions?
for example would i be able write out
$gameActors.actor (x).tp >5
$gameActors.actor (x).tp <5
@BrightIdeaProduction yes, you'd do this using the script function(it's on page 4 of the conditional branch window) in a codtional branch and write out,say:
$gameActors.actor(x).tp > 5

or you could do what @Shaz said and in a control variable, set it to script and place
"$gameActors.actor(x).tp"
then you would deal with the variable as you normal would.
Figured out a solution.

upload_2017-5-14_17-19-14.png
In short you can tie the TP directly into a variable. So then you can later check the variable.
If you're doing a conditional branch straight after and that's the only thing you want the value for, you can just put it straight into the conditional branch and skip the variable step altogether.

Code:
Conditional Branch: Script: $gameActors.actor(1).tp == 0
Ahhh Thanks, good .
One more question. does " == " mean equal in the fact of =?

I ask to clarify the expression for greater than or equal to.
Would it be => ? or how would that be expressed?
= is assignment
== is comparison

You would be after =>
thanks shaz

Original thread: https://forums.rpgmakerweb.com/threads/checking-tp-as-a-condition.78581/