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"

How to apply damage to AI and animate it?

My character has a weapon (axe) when right click is pressed he swings the weapon. I also have several AI's who wonder around I want to make it so when my character swings his weapon with right click and is in range the AI plays the death animation which I have then gets destroyed. This is a bit complex but if anyone could tell me how to do it I will be very thankful,

Thanks Yuness L.

Product Version: Not Selected
Tags:
more ▼

asked Apr 12 '15 at 04:12 PM in Blueprint Scripting

avatar image

yuness27
18 7 10 15

avatar image eXi Apr 12 '15 at 05:12 PM

Normaly you have a box collision around your weapon which is not active at start. In your Swing animation, you create 2 AnimNotifies. One for turning the box collision on and one for turning it off again.

Then you would create an BeginOverlap event which passes the Actor, casts it to the AI Class and use "Take Damage" on it. Thats an Actor Function, so you can call it on every actor.

On the AI you have the "Event Any Damage" which gets called if you call "Tage Damage". It has the game etc that you passed through Take Damage.

With this you can deal dmg or directly tell the AI to play an animation and destroy itself after.

avatar image yuness27 Apr 13 '15 at 12:15 PM

Could you explain the part about AnimNotifiers in more detail please because i'm not really sure how to do it,

Tanks.

avatar image eXi Apr 13 '15 at 12:28 PM

Hey, sorry i don't have much time today. But if you use google a bit, you can find tons of tutorials and docs about it (maybe also youtube)

https://docs.unrealengine.com/latest/INT/Engine/Animation/Sequences/Notifies/index.html

avatar image yuness27 Apr 13 '15 at 12:32 PM

It's fine thanks for the advice.

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

0 answers: sort voted first
Be the first one to answer this question
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