x

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"

Punching Damage on AI

Hi I'm fairly new to unreal and need help, i've been working on a fighting game and have everything setup apart from the damage output on the player. I would like it so that when the player plays the punching animation and the fist collides with an ai the ai will take damage. Ive been trying for hours now and cant find any help. I have setup damage for the player so that when i press p the health is displayed in the top left and goes down until 0 then the actor is destroyed but how do i trigger the health to go down on the ai when the collision spheres on the player models hands connect. The first image is of the ai health and the second is the players health.alt textalt text

Product Version: UE 4.10
Tags:
ai health.png (113.0 kB)
screenshot_1.png (238.2 kB)
more ▼

asked Apr 20 '16 at 07:52 PM in Blueprint Scripting

avatar image

Carrmaz
16 2 7 11

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

1 answer: sort voted first

I would look for overlaps with your Sphere Collision. When you get an overlap check to see if the overlapped actor is an enemy. If they are use an Apply Damage node with the 'Other Actor' as the target. On the AI side you will need the Event Receive Any Damage node.

Let me know if that isn't clear enough and I will make a mock-up for ya when I got some time.

more ▼

answered Apr 20 '16 at 08:21 PM

avatar image

HaxO
713 23 15 45

avatar image Carrmaz Apr 20 '16 at 08:26 PM

Thanks ill try that now

avatar image HaxO Apr 21 '16 at 03:04 PM

Did that work out for ya?

avatar image Carrmaz Apr 21 '16 at 05:57 PM

Hey, it didn't work after around a hour of trying i gave up. I have created a new way of taking damage.Thanks for the help though

(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