Help on death of enemy

I wanted to make a game where the character can inflict death if he uses a certain skill on a enemy.

The enemy in the game can't die through damage. 

This skill can only works if the enemy life is at 0 hp, meaning that he the enemy life is above 0 hp the enemy cant die by the skill.

I just started rpg maker vx ace so not sure how to script this out
you don't need scripts to do this, but it requires a mixture of features, states, troop events and common events to pull it off.

1) an enemy with HP=0 automatically dies, unless you give him the feature "immune to death" by a state (NOT directly, because you need to be able to remove the feature by removing the state).

So you have to make a state "resistant to death" and have a troop event adding that state to the boss at the beginning of the battle.

2) the skill to kill the boss needs to call a common event. That event will check the HP of the boss, if those are zero then it will remove the state preventing death (resulting in the boss being killed by hp=0)

I suggest you follow the link in my signature to a tutorial that will help you get started in RPGM
OK i understand but I do not know what kind of settings to put in the "resistance to death" state so that the enemy don't die.

I tried to follow immortal state but the enemy still dies by damage.

update: I added immortal state on turn 0 didn't see that condition setting in troops so now it works. The problem now is the conditional branch.

I type in

if enemy.1.hp > 0

text: enemy wont die

else

text: enemy die

remove immortal state.

The thing is when I used skill, it will give me a error on enemy.1.hp
Try the following:

The common event :

control switches skill switch on

The battle event

page 1          

condition : turn 0      Span : Battle

Change enemy state immortal

page 2

Condition : enemy HP 0 % or below  Span : Battle

Control switches killable on

Control switches skill switch off

page 3   

Condition : kill switch is on           Span: Moment

Conditional Branch skill switch == on

change enemy state remove immortal

now all you need to do is use the common event when the skill is used.
Thanks for your help,

I have tried if else method where it checks enemy data of their HP and it works as this is more or a 1vs1 MMA rpg.

Gonna now post another thread for another topic.

thread can be closed now. 
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-on-death-of-enemy.19873/