Yes, you can do so via events
Viewing post in Any Plans For Fog Wars?
I hate to bother you over trivial things, but I've been trying to figure this out for two days, and nothing seems to be working....
I was able to get the total number of enemies and allies in battle by using
$gameMap._actors.length
and
$gameMap.enemies.length
through Control Variables, but I can't, for the life of me, figure out a script call that makes the Variable only track remaining allies/enemies (In other words, actors/enemies that doesn't have the Knockout status). Is it possible to do this with this battle system? Or at the very least, is it possible to remove all dead Actors/Enemies from battle?
Enemy count can be gotten from $gameMap._enemies.length
To set a variable using script call, the code is $gameVariables.setValue(id, value) where id is the variable ID and value is the value to set it to.
eg: $gameVariables.setValue(1, $gameMap._enemies.length) will set the variable 1 to the total number of enemies.
To get the total number of living enemies, you need to filter the array:
$gameMap._enemies.filter(map_enemy => !!map_enemy._battler.isAlive()).length will give the number of enemies that are alive