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"

How do I make a button damage enemy AI?

How do I make a button that is on the User Interface deal damage to the enemy AI when it is pressed?

Product Version: UE 4.16
more ▼

asked Aug 09 '17 at 11:55 PM in Blueprint Scripting

avatar image


(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You would need a reference to the specific enemy you are trying to damage, a variable within that enemy to represent it’s health and when you press the button on the user interface it would have to take that reference get the enemy’s health and subtract whatever the damage amount is then set the health variable to the new value.

more ▼

answered Mar 30 '18 at 02:15 AM

avatar image

Nebula Games Inc
4.9k 27 9 14

avatar image ThompsonN13 Mar 30 '18 at 02:41 AM

yup basically on event pressed on the button apply damage to a referenced actor. then on the actor you could use the event any damage then work in a health system from there

(comments are locked)
10|2000 characters needed characters left
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