would anyone know how to create a custom ability that causes any damage dealt to the user, to reflect back onto the attacker for 50% of the damage they dealt for the duration of the ability.
i have no idea where to start or if its even possible.
example of what i am after
jeff uses the ability
mike shoots jeff for 100 damage and mike takes 50 damage while jeff takes the full 100 damage
At the same time eric also shoots jeff for 50 and takes 25 while jeff takes the full 50
in the end jeff takes 150 damage, mike takes 50, and eric takes 25
Simplest thing I can think of, is use a Player Took Damage Rule. This will trigger any time a player receives any forum of damage. You can then use the Event Damage value and multiply that by Whatever you want (in this case .5) to deal damage to the Attacker.
Now, if you are wanting an animation similar to Genji’s deflect, this isn’t possible. As we don’t have access to the tools needed to create (or even copy) animations & meshes.
This will essentially, do what you’re asking:
rule("Damage Reflect Rule")
{
event
{
Player Took Damage;
All;
All;
}
conditions
{
Is Button Held(Event Player, Button(Interact)) == True;
}
actions
{
Damage(Attacker, Event Player, Event Damage * 0.500);
}
}
In this example, Whenever a player is HOLDING the interact button, whatever damage they tike, half will be dealt towards the player who attacked them. IF you want this to happen without Holding the Interact button, just remove the “Is button Held” condition.
thank you for this it helped give me a starting point and i made the ability work the way i wanted perfectly.