I want to make a suicide attack, and I don't know how.
This is for AI controlled enemies.
How would I make a suicide attack?
● ARCHIVED · READ-ONLY
-
-
Add a common event to it, and in the common event, add state: death to the user, assuming the user is a player character and only one of them can use it.
-
Maybe have HP Cost? A bit more explanation please?
You can use this script:
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/ -
Or just add
a.die ; <damage formula here>In the skill formula. -
@Acesofacesmod: As far as I know you cannot make your HP cost equal to your HP, just one less than it. For practical purposes its still suicide, but I think the OP wants something more.
If you go to the link Aceofacesmod posted, check out the other yanfly scripts. Under the lunatic scripts there's one that lets you add an after effect of suicide which kills the caster. You will need two scripts though to do this, the lunatic script base and the add-on that allows the suicide effect, but it can be done. -
Yeah, I find that RPG Maker isn't very keen on making complicated battle actions possible. You could just do what Mr. Trivel said and put "a.die" or "a.hp = 0" in the damage formula which would literally make the battler who used the attack have their hp drop to zero and be removed from the battle, BUT there is no damage animation for this suicide, nor is any announcement made when the user dies, making it kind of awkward for the player :/ implementing these might take a lot of work and knowledge of coding.
I think the easiest and most prudent way to go about it would be using multiple compatible scripts as bgillisp suggested. -
Maybe this will help you somewhat, at least for the formula:
http://forums.rpgmakerweb.com/index.php?/topic/13574-how-do-i-best-make-a-suicide-attack/
http://forums.rpgmakerweb.com/index.php?/topic/29121-instant-ko-state-help/
Or:
https://himeworks.wordpress.com/2013/04/20/effect-add-self-state/
Or you can use the death state, though that will remove the enemy from battle (no EXP from the enemy). If that's all you need, it is easy to do through the Database. -
No don't do it. There is so much more left for your characters in this life. This isnt the answer!
-
Uh. I never knew a.die was an option.Or just add
a.die ; <damage formula here>In the skill formula. -
Skill formula:
^_^Spoiler(a.tower.locate << b.plane).explode