Variable not giving the right output?
I am new to using the unreal engine and the blueprints and I am trying to create a melee attack system, but the when I cast to the sword's blueprint it says that the damage variable as 0 when it should be set to 50.
I have set the damage variable in the sword's blueprint.
Thank you for you time!
asked Aug 30 '17 at 10:36 PM in Blueprint Scripting
So, first off I am going to preface this, but there's no need to do this on Tick.
You can make this an event based system.
Regardless, what's probably happening, is that bool "Attacking" is being reset to False.
Instead of doing your crazy tick damage thing and overlap setting your health. Use EventAnyDamage for your Character first off.
And then use ApplyDamage to actually apply the damage On Overlap. https://docs.unrealengine.com/latest/INT/BlueprintAPI/Game/Damage/ApplyDamage/index.html
Watch this tutorial, should help you understand better:
answered Aug 30 '17 at 11:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here