Hello. I need a bit of help writing up a kind of absorb/heal pair of skills.
Basically what I want to accomplish is for a character to have a skill that absorbs enemy hp but doesn't use it yet. Instead, the amount of hp damage done is stored in a variable. The character can then use a special healing skill that bestows hp on an ally of the amount stored in the variable. The character can also absorb multiple times, building up the amount of stored hp, then give it all with the healing skill. The variable, of course, resets to 0 after using the healing skill
I know you can use variables in the damage formula, and I'd also found somewhere that someone posted a similar question and got an answer that seemed useful. Unfortunately, I don't remember if it was on this site, and I've been having trouble finding it again. Basically, their response was something like this (and this is what I've been using):
Then, for the healing skill, I just put v[2]. I don't know if this is actually working, though. When I test it in game, the absorbing skill does the proper damage, but when I try to heal, it does nothing (specifically, it says the target took no damage, and a 0 pops up above their head.)
I'm not sure what I'm doing wrong, and I also don't know how to reset the healing skill to 0. I thought I could probably just call a common event in the skill effects for that, but I can't test it since in game it all comes up 0 anyways. Does it not work this way? Is there another way to do this? Should I request a plugin?
Any help would be appreciated.
-Atman
Basically what I want to accomplish is for a character to have a skill that absorbs enemy hp but doesn't use it yet. Instead, the amount of hp damage done is stored in a variable. The character can then use a special healing skill that bestows hp on an ally of the amount stored in the variable. The character can also absorb multiple times, building up the amount of stored hp, then give it all with the healing skill. The variable, of course, resets to 0 after using the healing skill
I know you can use variables in the damage formula, and I'd also found somewhere that someone posted a similar question and got an answer that seemed useful. Unfortunately, I don't remember if it was on this site, and I've been having trouble finding it again. Basically, their response was something like this (and this is what I've been using):
Code:
x = a.mat - (0.5 * b.mdf) ; y = v[2]; y += x; v[2] = y; x
Then, for the healing skill, I just put v[2]. I don't know if this is actually working, though. When I test it in game, the absorbing skill does the proper damage, but when I try to heal, it does nothing (specifically, it says the target took no damage, and a 0 pops up above their head.)
I'm not sure what I'm doing wrong, and I also don't know how to reset the healing skill to 0. I thought I could probably just call a common event in the skill effects for that, but I can't test it since in game it all comes up 0 anyways. Does it not work this way? Is there another way to do this? Should I request a plugin?
Any help would be appreciated.
-Atman