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"

Aplly Damage dealling 0 damage

I'm trying to make a AI chase and explode on when it hits the player, but the damage from the "apply damage" function retuns 0 every time.alt text

Product Version: UE 4.17
Tags:
chase-bp.png (86.4 kB)
more ▼

asked Feb 23 '18 at 12:50 PM in Blueprint Scripting

avatar image

Konahrik13
1 1

avatar image Arceyo Feb 23 '18 at 03:35 PM

A couple of quick questions to eliminate the obvious. What is your damage variable set to? I'm assuming that it is higher than 0, but you never know.

Where is this event being called initially? Specifically, I've noticed you've called this event again on the 'AI Move to' fail, but haven't fed anything into the 'player to chase' pin. Are you feeding an actor into this pin when it is initially being called?

Lastly, on the actor that is being chased, how are you handling the damage received? Event any damage?

Can we see all of these different set ups? It may help to troubleshoot your issue.

avatar image ThompsonN13 Feb 23 '18 at 04:01 PM

also try setting the acceptance radius to to a larger number like 100 for testing. if i remember right the acceptance radius is origin to origin so collision could cause a issue if the radius is too low.

avatar image Konahrik13 Feb 23 '18 at 05:31 PM

The default value for the damage varieble is 20. It's colled on "On see Pawn". The player to chase pin used on the "on see Pawn" event. It chases the player just fine, just the damage that returns 0.alt text

I also managed to make it work by doing a cast, but I now get another problem where the AI explodes when it can no longer moves in the direction of the player, like when it's close to a ledge, even when the player is far away, and still deals damagealt text

dano-bp.png (64.9 kB)
chase-bp2.png (98.1 kB)
avatar image Konahrik13 Feb 23 '18 at 05:32 PM

alt text

forgot about this one

on-see-bp.png (47.7 kB)
(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