pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
33
Reaction score
16
First Language
portuguese
Primarily Uses
RMVXA
Hello. Is there a way of checking the total number of enemies in a troop during battle? For example: through a script call.

Thanks in advance
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
199
Reaction score
64
First Language
German
Primarily Uses
RMVXA
Code:
$game_variables[x] = $game_troop.members.size

Replace x with a variable of your choice. If you want to interact with this, remember that some parts of the engine count the first member as member 0 (so a troop with 8 enemies would actually mean that the 7th is the last), so for those cases you may want to reduce the value by 1 before doing anything. I found that out the hard way.
 

pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
33
Reaction score
16
First Language
portuguese
Primarily Uses
RMVXA
Code:
$game_variables[x] = $game_troop.members.size

Replace x with a variable of your choice. If you want to interact with this, remember that some parts of the engine count the first member as member 0 (so a troop with 8 enemies would actually mean that the 7th is the last), so for those cases you may want to reduce the value by 1 before doing anything. I found that out the hard way.
Thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

Grading the last exams for this semester and I need a break because I am laughing too hard xD
edit: Video link removed due to well Internet problems making it essentially nothing anyway. :kaoswt:
Sleep logic:
4 hours or less = I feel like I'm dying
5-6 hours: Feeling well rested
More than 6 hours: I feel like I'm dying
Women always say "I want to be spoiled" then get mad when I spoil them. Why would you say that if you didnt actually want to know the ending?


decided to have subclasses work differently in my game. They summon in a partner when you select one. this took some work tho as I had to get the class scene to pop up as a common event instead of straight from the menu. it was the only way to add/remove party members while on the menu screens.

Forum statistics

Threads
131,543
Messages
1,220,651
Members
173,220
Latest member
ZecaVn
Top