How do I make a rebound class of damage skills, that is, the combatant attacks the target, after the target is damaged, according to the percentage bounce to the attacker. I tried several methods, but I couldn't calculate the damage.
An easy built-in way would be to use the Absorb Settings of abilities. Using negative percentages should damage the user instead of healing.
Otherwise, status values can use schematics whenever they're changed - see the Change Schematics settings of the status value. The combatant who caused the change (if available) will be used as Maschine Object, the combatant who's status value was changed will be used as Starting Object. The change value is available as a local int/float variable via the variable key change, the old value as oldValue and the new value as newValue. So, you can make some checks if the damage should bounce back in the schematic and do the percentage calculation using the change value.
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I see it, but I still can't do what I want. I want the target to have a rebound ability, so that the combatant can hit and take damage from the rebound.
Ok, maybe you can go into a bit more detail about what you want to do and what you already tried?
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
In simple terms, it is the actual amount of damage the player does after attacking the target, and then the percentage of the damage that bounces back to the player. I've done this before with defensive, but he can't bounce actual damage.
Because my damage formula has an initial value.
I used the defensive status effect to rebound damage. But he can't calculate the actual damage that the player does, because in my damage formula, each skill has an initial value.
Well, I already told you the 2 ways this can be done - either using absorb or status value change schematics. Both operate on the actual damage that was dealt.
Any other way would require to you store the damage that was done (e.g. using a status value change schematic and storing the change value into an object variable on the combatant) and use that stored value.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Otherwise, status values can use schematics whenever they're changed - see the Change Schematics settings of the status value. The combatant who caused the change (if available) will be used as Maschine Object, the combatant who's status value was changed will be used as Starting Object.
The change value is available as a local int/float variable via the variable key change, the old value as oldValue and the new value as newValue.
So, you can make some checks if the damage should bounce back in the schematic and do the percentage calculation using the change value.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Because my damage formula has an initial value.
I used the defensive status effect to rebound damage. But he can't calculate the actual damage that the player does, because in my damage formula, each skill has an initial value.
Any other way would require to you store the damage that was done (e.g. using a status value change schematic and storing the change value into an object variable on the combatant) and use that stored value.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!