How do you refrence a specific actors TP?

Through code. I tried "$gameActors.actor(1).tp>20" without the quotation marks, but it doesn't work. Any ideas?
Try:
Code:
$gameParty.members(partyId).tp

Edit: I don't know why it isn't working for you. Have you tried to input the value in the console? $gameActors.actor(1).tp should return the tp of actor id 1, not to be confused with party members.
I want it to return if the actors TP is 20 and above. I'm using Galv action conditions to try and make cooperation skills (Yes i know he made a script for that, but either i have no idea what im doing, or scripts are clashing. More likley the former) and i want one of the requirements be that the other actor has enough TP. I'm not using TP for anything else

Edit: It didnt work
$gameActors.actor(1).tp should work. What does happen when you try that? Put it into a variable and display the variable in a message box. Or enter it in the console when you're in battle.

Please show us a screenshot so we can see the full command (and context), and a screenshot of the console with the results after you enter that command.
As you can see. The skill is usable. even though Rue's TP is below 20
SS1.png
Untitled.png
If you did this in the console, you would see this:

$gameParty.members(1).tp
undefined
$gameParty.members(1)
(4) [Game_Actor, Game_Actor, Game_Actor, Game_Actor]

$gameParty.members() does not take an argument. It returns an array containing all battlers. Arrays start at index 0.

If you use $gameParty.members()[1] you will get Lavina. To get Rue, use $gameParty.members()[0]. Or simply $gameParty.leader().

Do you want the tp of the leader, or specifically Rue's tp? If you specifically want Rue's tp, then don't use the above, because the player could change the order and $gameParty.members()[0] and $gameParty.leader() could both refer to someone else. If you want Rue's tp, and Rue is actor 1, use $gameActors.actor(1)

What if there are more than 2 party members? Do you want them ALL to have 20+ TP in order to use the skill? If that's the case, use this:
$gameParty.members().every(function (actor) { return actor.tp > 20; })
or this:
$gameParty.aliveMembers().every(function (actor) { return actor.tp > 20; })


Can you provide a link to the plugin? I'm having a hard time finding it.
Sorry, i said Galv, but meant VictorSant >.<
My bad. Im only using Galv's proximity script

ignore that - found what I needed. Please see the rest of my post above and adjust accordingly, and let us know if you got it to work.
I just want Rue's TP. The skill is going to be a combination of Rue's Fae bolt and Lavina's Dagger toss once i enter the rest of the information in the skill
Is Rue always the party leader? Is Rue Actor 1?
They're actor 1. Not sure yet if they're always going to be the lead actor

Edit: Well, thank you everyone who tried to help

Edit: I tried $gameParty.members()[0] and the skill was usable even with the requirments not met. I changed it to $gameParty.members()[1]. And the skill was unusable, even when all party members had TP over 20
Can you show a screenshot of the skill as you have it now? Also a screenshot (or more) of your plugin manager? Any chance you have other plugins that are competing with this one?
Plugin_manager.png
FaeBolt.png
If Rue is actor 1, then you should use

result = $gameActors.actor(1).tp > 20

If you go into a battle and open the console (F8), and type in the following:

$gameActors.actor(1).tp

what does it give you? Is the skill selectable?

If you can't get it to work, you can zip up your project and send it to me and I'll take a look. I'll be here for another 6 hours or so.

I wonder if it's conflicting with the HIME Actor Battle Commands plugin?
ok

Edit: How do i output it so the game data is accessable? And whats a free uploading site i can upload it to without viruses?
Sorry - wasn't keeping watch on the thread. I'm downloading now, but if you have to share your game with someone again, it would be quicker (for both parties) if you zip it up beforehand.

And a silly question while I'm waiting for Google Drive to zip it so I can download ... you ARE doing a Play Test, aren't you? Not a Battle Test?
Whats a battle test? I usually just hit the green arrow
Battle test is when you want to test the battle without doing a test play (green arrow). It's an option inside the Troops tab. Many battle plugins (including this one) won't work properly with Battle Test because the database is loaded differently, and the plugins set up their "special" data via the standard database loading method, and the logic is generally not included in the battle test loading method. As long as you're "hitting the green arrow" this isn't something you need to worry about - the way you're doing it, the plugins should work.

Anyway, I think there's a bug in the plugin. The method starting at line 174 says this:
Code:
    Game_BattlerBase.prototype.meetCustomActionConditions = function(item) {
        if (!item || !item.actionConditions) return true;
        if (this.testCustomActionConditions(item)) return false;
        return true;
    };

Can you change it to this?
Code:
    Game_BattlerBase.prototype.meetCustomActionConditions = function(item) {
        if (!item || !item.actionConditions || item.actionConditions.length === 0) return true;
        if (!this.testCustomActionConditions(item)) return false;
        return true;
    };


I don't know if he comes here any more, but tagging @Victor Sant to see if he can check my logic.


This line:
Code:
if (this.testCustomActionConditions(item)) return false;
actually caused it to return false if the action condition was met, and true if it wasn't, so it was backwards.

But after changing that, it caused it to return false for even actions that had no action condition.

This line:
Code:
if (!item || !item.actionConditions) return true;
would never return true, because even if there were no action conditions against a skill, item.actionConditions is an empty array. So instead of (or in addition to) checking for a null object, it needed to check for an array with 0 elements.


The above two changes get it working for me as I expect. See how it goes for you.
ok thanks. I'll try it

Edit: I think I'm going to need to buy the full version of MV in order to change it. I'm on trial version right now
You could also shorten that further to this:

Code:
   Game_BattlerBase.prototype.meetCustomActionConditions = function(item) {
       if (!item || !item.actionConditions || item.actionConditions.length === 0) return true;
       return this.testCustomActionConditions(item);
   };

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-refrence-a-specific-actors-tp.113038/