variable based on how many enemies still alive in battle?

i dont know if this work

$game_variables[1] = $game_troop.membersplease help 
thanks
You want to get the size or length of the array of enemies.

Code:
$game_variables[1] = $game_troop.alive_members.size
You want to get the size or length of the array of enemies.

$game_variables[1] = $game_troop.alive_members.size
thanks hime, just what i wanted

i love your scripts 😉

Original thread: https://forums.rpgmakerweb.com/threads/variable-based-on-how-many-enemies-still-alive-in-battle.45828/