pedrocarsamar

Villager
Member
Joined
Jun 19, 2017
Messages
22
Reaction score
11
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
194
Reaction score
59
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

Villager
Member
Joined
Jun 19, 2017
Messages
22
Reaction score
11
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

Couldn't sleep at all so I started working on the topmost deck. I've had to make several deviations from the Imperator/Berengaria's deck-plans to accommodate MV's movement, but 100% accuracy was never my intention.
Still no name for the poor ship...:kaodes:
Screenshot-2022-06-25-053308.png
ScreenShot_6_24_2022_9_20_7.png
Here's Mike when you get a preemptive strike in battle. There's another one for when an enemy sneaks up on you too.
Suddenly, games mean nothing. The money spent was worth it to bring souls towards the light of life. May God bless my path forever. I pray that all are shaken for truth and poured out flat on the table of true understanding, knowledge, and wisdom. Bless you.
Finally I bought OMORI...cant wait to get traumatised!!!
Finished making this pretty ambitious forest map. Was wondering what y'all think of it! :kaopride:
1656136876015.png

Forum statistics

Threads
123,022
Messages
1,153,466
Members
161,365
Latest member
sieuthitien
Top