MV Targeting the enemy that used the skill in common event

I hope someone can give me a clue on this one, been pulling my hair out for ages on it.

I have an enemy, who's attack skill effect is linked to a common event, which ticks over a variable ever time it's used. The skill needs to be inflicted on the hero 5 times, and progresses an image chain before, the hero's retaliation is triggered.

My issue is that I can't figure out how to add in the common even at that point in the script, to affect the enemy who used the skill. You can only seem to nominate a specific enemy 'number', rather than the caster/user, like how you can in the invocation panel on the skills screen.

Example of the event setup:
Control Variables: #0019 EnemySkill +=1

If : EnemySkill = 1
Show picture : #23 Blahblahblah
: End
If : EnemySkill = 2
Show picture : #23 Blahblahblah
: End
If : EnemySkill = 3
Show picture : #23 Blahblahblah
: End
If : EnemySkill = 4
Show picture : #23 Blahblahblah
: End
If : EnemySkill = 5
Show picture : #23 retailiation
Change Enemy HP : #1, + 100 ------THIS IS THE ISSUE - When enemy #1 is already dead, it does nothing------
: End
General principle:
You need an invisible "marker" state that needs to be applied to the enemy on skill use.
after that you make eight conditional branches for the eight possible enemies, checking each for the state and only do the effect on the one where you found the state.

In your case it might be a bit trickier due to the need of more skill effects and/or targets, but that only means you'll need to be more careful when constructing the checks.
Ye
General principle:
You need an invisible "marker" state that needs to be applied to the enemy on skill use.
after that you make eight conditional branches for the eight possible enemies, checking each for the state and only do the effect on the one where you found the state.

In your case it might be a bit trickier due to the need of more skill effects and/or targets, but that only means you'll need to be more careful when constructing the checks.
Yeah, that makes sense, i'll give it a go. Thanks for the help

Original thread: https://forums.rpgmakerweb.com/threads/targeting-the-enemy-that-used-the-skill-in-common-event.181021/