Don't know where to post this for sure.
I can't find out how to check an Enemy's ID using either a Common Event or Javascript. Also, I can't figure out how to simply check if a particular enemy is alive or not. I want to say it'd be something like enemyTroop_member()[ID_#].isAlive but I don't really know.
One of the things I want to do is check Enemy IDs so I can remove them from a battle without it counting as a defeat. Also I need that info to determine certain States to add to them and what messages to have pop up during battle.
I'm quite desperate and fairly novice at Javascript. Please help! This could save my game.
Checking Enemy IDs and if alive
● ARCHIVED · READ-ONLY
-
-
You need to check enemy index in troop, not enemy ID.
And that is simply done by control variable, game data, for troop index 1-8.
EDIT:
to add an explanation, the enemy ID is the number that identifies the enemy data in the enemy tab. this number can't be used to check current HP in a battle because that enemy can be in the troop multiple times (all having the same ID but different troop index).
The troop index however can be selected in control variable game data to get specific data on the enemy that has that index in the troop.
However, as long as you're in common events you can only select the index without names because the common event doesn't know which troop it will be used on.
Open the control variable comman on game data while being in a troop event will show you in a better way how this works - the common event will work exactly the same if executed during battle, the editor just can't show it in the same way. -
Thank you, that clarifies a lot for me. The 1-8 limit is part of the problem, especially since I'm using the HIMEWORKS Enemy Reinforcements Plugin to sometimes call more than 8 Enemies at a time, meaning any Enemies still in the battle may not be recognized by the game as fitting in slots 1-8. And as far as I know I can't assign an Enemy to one of those slots, which would really help.
I'm just trying to make a new system now for the game and see how it does. I forgot that, just like with items, the game doesn't differentiate between Enemies in a Troop if they're the same type, even if it labels them A, B, C, etc. -
Even himes reinforcements have indices like I described, the editor just can't use them.
You'll need the script equivalents of those event commands (they're listed in a stickied topic somewhere in this forum), and then check the plugin to learn how it assigns the index numbers when calling Reinforcements