Question about Calling common event using "Effects" in a skill

I am trying to create a skill.

It is easy to call a common event using the built-in Effects setting.

Although in the Formula, a stands for the user who performing the skill,

how do I pass "a" to the common event?

Speaking in detail,

I want my hero to perform a skill that damage two enemies' HP and at the same time kill herself/himself.

I set "scope" to 2 random enemies and enter "a.hp" in the Formula.

The two enemies are damaged by a.hp.

However, my hero do not die.

So, I want to call a common event to call "Change state" to set my hero to "Die".

But I can not figure it out how to let the common event know which hero I am pointing to.

(There are four heroes in the party. They all can perform that skill)

Thanks for your help and ideas.
Try putting "a.addState(1) : a.hp" in the effect field and see if it works
It did not work, Smelipana.

I think the reason is that the calculation of damage is at the last, so addState(1) makes my hero's hp become 0, so a.hp = 0. Therefore, the enemies will not be hurt because the damage is 0.
Put a ";" instead of a ":", the ":" is the "else" of the conditions.

So

a.addState(1); a.hpYou can do a lot of things with the formula box 🙂
good call, @Nuhada, i hit the wrong semi-colon/colon <3
It did not work, even after I corrected the ":" mistake according to Nuhada.

I think the reason is that the calculation of damage is at the last, so addState(1) makes my hero's hp become 0, so a.hp = 0. Therefore, the enemies will not be hurt because the damage is 0.
By chance, could you offload the a.hp into a variable? im not as familiar with trying that yet, but that seems like the most plausible solution. Maybe Nuhada might know? If not ill look but that seems like the most likely fix for your problem
Try

r=a.hp; a.gainHp(-r);rHp stocked into the variable r, deduce Hp to the player (so death), and do damages. You can replace the "a.gainHp(-r)" by "a.addState(1)", but i just don't like this like this 😛
Thank you Nuhada. That works fine and I have learned a new skill.,!
i didnt relize it was as easy as just declaring it a variable letter!!! GAHH lol. i thought you would have to use a game.variable or something more complicated! thanks!

Original thread: https://forums.rpgmakerweb.com/threads/question-about-calling-common-event-using-effects-in-a-skill.48406/