ASUG0

Annihilation Special Unit Generation 0
Veteran
Joined
Jul 16, 2020
Messages
48
Reaction score
11
First Language
German
Primarily Uses
RMMV
Hi,
I wanted to ask how I can check the TP value of an enemy in battle.
My idea was to use this line of code:
if ($gameTroop.members()[1].tp > 49) {$gameVariables.setValue(62, 1);}

But it didn't work! pls help

thanks ^^


Edit: solved it myself
 
Last edited:

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,079
Reaction score
629
First Language
Poland
Primarily Uses
RMMV
Probably because you aim for wrong troop member, keep in mind, that index 0 refers to first troop in group, so if you have 3 enemies in group, first one will have index 0 and the last one 2

Try $gameTroop.members()[0].tp

See in this pic? https://prnt.sc/15x47en
There is only one orc and by index 0 I can obtain TP, but with index 1 there is an error because he's alone in battle
 

ASUG0

Annihilation Special Unit Generation 0
Veteran
Joined
Jul 16, 2020
Messages
48
Reaction score
11
First Language
German
Primarily Uses
RMMV
Probably because you aim for wrong troop member, keep in mind, that index 0 refers to first troop in group, so if you have 3 enemies in group, first one will have index 0 and the last one 2

Try $gameTroop.members()[0].tp

See in this pic? https://prnt.sc/15x47en
There is only one orc and by index 0 I can obtain TP, but with index 1 there is an error because he's alone in battle
thank you for your replay ^^
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,552
Messages
1,075,790
Members
147,551
Latest member
ananansy
Top