TP as Limit Breaker - Help needed

Hello guys and gals of the Maker community, I have an idea that I'm trying to flesh out but unfortunately I don't know enough about Java to make it work. Let me start out by trying to show you what I'm attempting to do.  


At the end of every turn during a battle, I call a common event.


Battler screen.PNG


That common event is supposed to check actor 1's TP, if it's about 60 he gets a state that allows him access to a skill type, if below 60 he loses access to that skill type.  To check the TP I use $gameactors.actor[0001].tp > [60] in a conditional branch. Here is where I think the problem is, I'm not calling this correctly. 


Script.PNG


The resulting error is below, I've been fussing with it for a while and can't get it to work properly. Any help is appreciated.


Error.PNG


Happy game making! 


~Skela
Now, keep in mind that I'm no coding major. The suggestion I make is rather off hand, and someone is bound to come in and whack me with a frying pan, and then give you the right answer, but you're free to try this till then;


Instead of using the number value for the character, try using his name, that is; $gameactors.actor[Isaac].tp > 60


If that doesn't do anything, you might have to call up who character 1 is first, before putting it further. I forget it exactly, but perhaps something like $gameactors.actor[0001] = Isaac


Again, I'm pretty new to coding myself, but until someone far wiser shows up with a better, and correct solution, you could probably try those.
Your syntax is totally wrong;


First, the correct is $gameActors, not $gameactors. Coding is case sensitive.


Also, $gameActors.actor is not an array, it's a function, so you should use parenthesys, not brackets. Also don't use brackets on numeric values.


the correct code is


$gameActors.actor(1).tp > 60


Also doing this with common events will require you to use this common even on *every* troop.


You would get better results by using plugins, some plugins that might help to acheive what you need:

Thank you guys for the save, I'm relatively new to writing java so I apologize if that was hard to look at.


Anyway it works like a charm! I'll take a look at those scripts you suggested, many thanks!
Thank you guys for the save, I'm relatively new to writing java so I apologize if that was hard to look at.


Anyway it works like a charm! I'll take a look at those scripts you suggested, many thanks!



Welcome to RPGMaker-ing. I would suggest you look over Victor's highlighted plug ins. I am using them in one of my projects and it functions perfectly!!

Original thread: https://forums.rpgmakerweb.com/threads/tp-as-limit-breaker-help-needed.59260/