MV Check if enemy is dead or has zero HP via script call

I guess it would be smth like $gameTroop.member().isAlive but I'm not sure
it depends on where and when you want to use that script call.
in a troop event it's usually easier to use the game data section of control variable (not the script section) or the event conditions.
In a plugin it depends on when and where you call the function.
outside a battlescreen that won't work at all because outside the battlescreen no enemies exist.
Inside battle screen. My battle system works on parallel events.
"Is enemy #1 (index 0) alive?"
JavaScript:
$gameTroop.members()[0].isAlive()

"Is the current HP of enemy #1 equal to 0?"
JavaScript:
$gameTroop.members()[0].hp === 0

The parts for these script calls (and much more) can be found here, in case you're interested:
"Is enemy #1 (index 0) alive?"
JavaScript:
$gameTroop.members()[0].isAlive()

"Is the current HP of enemy #1 equal to 0?"
JavaScript:
$gameTroop.members()[0].hp === 0

The parts for these script calls (and much more) can be found here, in case you're interested:
This works, thank u

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/check-if-enemy-is-dead-or-has-zero-hp-via-script-call.141554/