Enemy that uses specific skill only if he's alone

How do i make it so if an specific enemy is alone, he will use a specific skill?
Could have a troop event that counts up a variable whenever enemy x is 0 hp (with an if condition for each enemy in the troop except the one with the skill)
Make a second troop event page that has: When that variable reaches whatever the amount of enemies that needed to die, turn on a switch. Set condition for skill to that swtich. Profit.

I'm sure there are fancier ways of doing it, but this should work.
How do i make it so if an specific enemy is alone, he will use a specific skill?
if youre not averse to plugins, Yanfly's enemy AI plugin lets you have more control over when an enemy should do specific skills. Using a skill only when the enemy is alone is an easy thing to set up with it
if youre not averse to plugins, Yanfly's enemy AI plugin lets you have more control over when an enemy should do specific skills. Using a skill only when the enemy is alone is an easy thing to set up with it
This worked! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/enemy-that-uses-specific-skill-only-if-hes-alone.166238/