Hey! Hopefully this should be a simple thing but I'm having trouble finding exactly what I'm looking for.
My game is kind of lighthearted with lots of characters from multiple franchises so you can create your dream team and all kinds of crazy combinations. My latest addition is Nightmare from the Soulcalibur games and I want him to have his iconic sword, Soul Edge, which consumes the souls of those he kills. What I want is for Nightmare to regen a small amount of HP whenever he KILLS an enemy, but ONLY when he kills one. I can't seem to replicate or find a way to accomplish this and I'm hoping I won't require a whole script for one small character trait but I'll use one if there's no other way.
Originally I thought of just having his basic attacks deal Absorb element or something but I don't really want him to restore HP every time he hits something. I'd rather it's just when he gets a kill and I'm thinking the amount of HP he restores should be a small percentage rather than being based off of how much damage he deals.
Is there a simple way to accomplish this?
Have his attack inflict a state that resists knock-out. Then through common event, check if that enemy is at 0 HP + have the state inflicted. If yes, trigger the regen and afterwards remove the condition from all foes (so it won't persist).
I'm not 100% sure how to set that up. In Common Events, all I can really do is set a Conditional Branch but the only options for enemies are if they have appeared or not, or if they are inflicted with a certain status. There's seemingly no way to check HP from there.
Troop/Battle events can check HP and I can then do the state conditional from there to do something like what you mentioned, but I'd probably have to create an identical event page for every single enemy in the troop which would require a lot of copy pasting and it would make my troop events too cluttered since there could be 6 pages all for the same effect just on different enemies :/ Might end up being more trouble than it's worth. I'll give it a try though just to see if it works.
You'll have to set a variable to read the enemy's HP first, then set up a conditional branch to check if that variable's value is at 0.
That's a little over my head unfortunately :/ Variables aren't really my strong suit. My idea for in-battle events randomly worked one time but didn't any of the others either. I might just have to forget the idea for now and come back to it at a later date. Thanks for the help anyway 🙂
EDIT: Pinpointed my battle event issue. If Nightmare hits the enemy but doesn't kill it straight away, the state gets applied. If he then hits them again, it will die and he will gain health. If he kills it in one hit, however, the game doesn't bother applying the state at all so the enemy just dies and he gets no health.
EDIT #2: Might help if I told you how many battle event is setup.
If Goblin A Health equal or less than 0%
- If Goblin A inflicted with Soul Claim
- Nightmare +5 HP
- Remove State 'Soul Claim' from all enemies.
Thanks for the details, I think I've set up the Common Event right now. When called, it'll set all 8 enemies HP to the appropriate variables and then check all enemies HP and states and apply the heal if necessary and then at the bottom of the event I did the 'remove state' thing.
I'm just not sure how to actually CALL the Common Event now. I assumed it'd just be a Parallel Process but according to the tooltip those only work out of battle... lol.
Should I just make all regular attacks call the event? It shouldn't really mess with anything if other other characters trigger it right?
Thanks Kes 🙂 I might check that out. I'm not totally new to variables but when it comes to more detailed stuff like this, I'm not usually able to see/plan all the steps I'll need to take to accomplish what I want, even though I don't doubt it's possible, so I get mad at myself and quit, lol :/
EDIT: told Attack to call the common event and it worked in the sense that it removed the states at the end, but it didn't do anything else (no regen) 🙁
EDIT 2: Ok regen DOES work, but only if Nightmare doesn't kill them in one hit...
It seems like the State isn't being applied before the Common Event is triggered, so if the enemy would take enough damage to die, they will just die instead of being applied with the state that makes them immune to dying.
Thanks a lot for trying to help ^_^
Sadly it did not work 🙁 No error or anything, just no effect.
I have many skills like this. I just do the following:
if b.hp < [damage formula]; a.hp+=[heal amount]; else; [ what happens if they don't die]; end; [damage formula]
Note: Brackets are not needed.
If it exceeds the limit of the formula box, create a blank section in ur script editor (below materials and above main) and make the formula equal to something. For example...
SKF = "if b.hp < [damage formula]; a.hp+=[heal amount]; else; [if they don't die]; end; [damage formula]"
Note: Quotations must be there
Then, in the damage formula, just put:
eval(SKF)
You will also need to have variance equal to 0 for this to work. Hope this helps!
Thanks a lot, I really appreciate it. I'll sit tight for a while and maybe take a little break from RPG Maker until then 'cause it's been stressing me out lately, lol. I'll drop you a message on Monday if I haven't heard from you.