VXAce How do I use this thing?

1768280304172.png

I was recently working on a common event where using an item would summon an ally. However, I wanted to trigger a specific dialogue option if a specific enemy appeared, but I didn't know how. I tried using conditional statements, but I couldn't figure it out. Does anyone know how this works, or can someone tell me what to do?
The condition you have there should work, didn't it? Can you give more details, like what the event does step by step, what didn't do what you wanted it to do, etc.?
If you're using that command outside a troop event, the editor will not know which enemy is placed before the battle is called - that is why the eight indices for the enemies in the troop are empty.

however the command will still work if called in battle - you just have to remember which enemies are in which position of the troop when the common event is called (which is different depending on which troop the party is fighting).

For your idea you need to check the troop ID, not the enemy index of the troop.
If that enemy is in the troop, then trigger the special dialogue on summoning - and that is probably best done with a troop event as well, unless the enemy is in every troop.

to do it in a troop event, the summoning should probably trigger a switch or so as the troop events do not have conditions for items used.
I see the problem now, thanks to Andar. I looked in my script call collection, and found this:

$game_troop.members.any? { |enemy| enemy.enemy_id == X && enemy.alive? }

It says (I copied it from somewhere, haven't tried it myself) that this should "return true if there is any enemy with the ID of X and that enemy is appeared and still alive", which I think would be what you want. So maybe try putting this in the condition (substituting X with the enemy's ID number).

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-use-this-thing.181928/