[RMXP] HOW TO MAKE AN ATTACK THAT SETS HEROES HP TO 1?
Posts
Pages:
1
How do I make an enemy set my heroes HP to 1? I need two versions where (1) the attack hits only one random hero and (2) where it affects the whole party. This is what I'm looking for to make it clear:
https://www.youtube.com/watch?v=z3hMBcT2jMg
https://www.youtube.com/watch?v=z3hMBcT2jMg
This is fairly easy to do. The problem is that RPG Maker XP does not have a way to directly access the HP of a party member in battle. So you'll have to improvise a little. Here's how it works:
Create a State in the database that has no effect, like this:
It's important that inflicting this state always succeeds, so set it to Nonresistance. (Of course, if the attack is supposed to have a chance to miss, you can simply reduce its Hit Rate in the next step.)
This State should be invisible as well, so give it no animation and set its rating to 0.
Now, create your skill. It can have whatever animation you want, the important things are: It must deal no damage. It must inflict the effectless State you made before. And it must call a Common Event, as shown in this image:
So what happens now is that when the enemy uses this skill on any hero, they don't yet take damage, but the State is inflicted on them. This kind of "marks" them for our intents and purposes. In the final step, create the Common Event like this:
The Conditional Branches in this Common Event will check if an Actor has the effectless State, which means that they must have been hit by the skill. So if that is the case, set the Change HP command to reduce that character's HP by a huge amount (more than your characters' HP can ever be). But take care to leave the "Allow Knockout in Battle" box unchecked. That way, the character will always remain at 1 HP. After that, remove the State from this character.
In my image, I only set up the Conditional Branches with everything inside them for two characters. You'll need to put one for each playable character in your game into the Common Event.
To make a version that hits all heroes, simply make a different skill with the Scope set to All Enemies instead of One Enemy. Everything else can remain the same, including the Common Event.
The disadvantage of this setup is that no damage number will pop up when the skill hits. It should theoretically be possible to work around this, but that would require a huge amount of effort and complicated eventing.
The setup I described above should work well enough, though. Hopefully this helps. Best of luck with your project!
Create a State in the database that has no effect, like this:
It's important that inflicting this state always succeeds, so set it to Nonresistance. (Of course, if the attack is supposed to have a chance to miss, you can simply reduce its Hit Rate in the next step.)
This State should be invisible as well, so give it no animation and set its rating to 0.
Now, create your skill. It can have whatever animation you want, the important things are: It must deal no damage. It must inflict the effectless State you made before. And it must call a Common Event, as shown in this image:
So what happens now is that when the enemy uses this skill on any hero, they don't yet take damage, but the State is inflicted on them. This kind of "marks" them for our intents and purposes. In the final step, create the Common Event like this:
The Conditional Branches in this Common Event will check if an Actor has the effectless State, which means that they must have been hit by the skill. So if that is the case, set the Change HP command to reduce that character's HP by a huge amount (more than your characters' HP can ever be). But take care to leave the "Allow Knockout in Battle" box unchecked. That way, the character will always remain at 1 HP. After that, remove the State from this character.
In my image, I only set up the Conditional Branches with everything inside them for two characters. You'll need to put one for each playable character in your game into the Common Event.
To make a version that hits all heroes, simply make a different skill with the Scope set to All Enemies instead of One Enemy. Everything else can remain the same, including the Common Event.
The disadvantage of this setup is that no damage number will pop up when the skill hits. It should theoretically be possible to work around this, but that would require a huge amount of effort and complicated eventing.
The setup I described above should work well enough, though. Hopefully this helps. Best of luck with your project!
Thanks for the reply! I tested it and it works perfectly with single and multiple targets. It's not a big issue that there is no damage pop up, this will be enough to make some devastating attacks for boss fights ;)
Pages:
1














