Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.alt text

I have set the damage variable in the sword's blueprint.alt text

Thank you for you time!

Product Version: UE 4.17
thirdpersonpic.png (87.7 kB)
swordpic.png (75.1 kB)
more ▼

asked Aug 30 '17 at 10:36 PM in Blueprint Scripting

avatar image

3 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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:


more ▼

answered Aug 30 '17 at 11:09 PM

avatar image

2.4k 61 27 113

avatar image ryan7413425 Aug 30 '17 at 11:54 PM

Thanks so mush for this it worked really well!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question