Announcement

Collapse
No announcement yet.

How to deal damage to AI?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to deal damage to AI?

    Hello,

    I was looking for some AI tutorials nut the most of them where pretty useless so I tried myself.
    At first I want just a shootable NPC. I managed it by adding to 'Hitboxes' (Sphere and Capsule Component) add an Event on Hit and change the Health variable.
    The Problem is the it's not working everytime. The head hitbox works great everytime, the body hitbox works sometimes from the front but never from the sides and the back.
    If I'm workin with only 1 hitbox it's working everytime (like the head hitbox). The question is why is this happening and how is the best way to deal damage by a projectile?

    Click image for larger version

Name:	AI.jpg
Views:	1
Size:	253.0 KB
ID:	1138014

    Thank you!
    Last edited by KAEPS133; 09-01-2014, 08:06 AM.

    #2
    I'm on mobile so here is my guess, the reason your event doesn't trigger is probably from your mesh extrude out side of collision capsules, and somehow your skeleton mesh also have collision enabled and generate hit events. if this happens, then your skeleton mesh eats away the hit enent and your capsule does not get hit by projectile.

    try see the settings on your skeleton mesh and turn off collision than try again.
    Unreal Engine 4 Game Framework diagram for relation of all major base object types
    Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
    Resident Evil Classic Camera
    RPCs official document, Must Read
    Everything you should know about replication

    Comment


      #3
      Thank you. I was just looking for the root capsule component and ignored the mesh collision. Now with the mesh collision off it's working just great!

      Comment

      Working...
      X