Making a combat system with high,low attack and block. I can’t figure out how to do it. Do I use two collision capsules?
Is this for blueprint? This seems like it is for code
it works the same way for c++ or blueprints.
It depends in what you want to do.
You can:
—Create different DamageTypes to have control, so you would know if the attack was: high or low.
http://i.imgur.com/ZxKr0bt.png
http://i.imgur.com/7A4gKl3.png
—P.S: Event any Damage is recieved when you execute any of the “Apply Damage” functions.
http://i.imgur.com/60gdIzf.png
—For Block, you can create a variable, boolean, if it is true, don’t give damage, or reduce the damage, if it is false, do the damage.
BASIC EXAMPLE:
On your Character:
- On Event Component Begin Overlap ( this case, the component this needs to be assigned to is your hand capsule )
-
Do the following: -
Apply Damage to enemy, with damage type high/low, gives 20 damage. -> "gives 20 damage" this is to be choosen by you, just give the number in the "Base Damage" param.
On your enemy:
- On Event Any Damage
- Do Something you want, check if you’re blocking, whatever you want, decrease health, anything. → you can use the “Damage” output to decrease health. ( The output named “Damage” has the value as the inputted value “Damage” in “Apply Damage” function )
http://i.imgur.com/Hp2Vhaq.png
http://i.imgur.com/8Et3sSb.png
Hope that helps,
Alanzote.
Pretty impressed by the effort you went to for this answer.