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"

LineTraceByChannel - detect a Blueprint class

Hello,

How would I use a LineTraceByChannel to detect the Blueprint Class of my AI_Enemy to be able to destroy it? alt text

As well as this, the Print String does not show any of the enemies regardless of being plugged into the Hit Actor or Hit Component part of the Break Hit Result node. Any help would be greatly appreciated :)

Product Version: UE 4.19
Tags:
blueprint.png (137.1 kB)
more ▼

asked Jun 08 '19 at 07:12 PM in Blueprint Scripting

avatar image

artificialname
1 1

avatar image DonBusso Jun 08 '19 at 07:39 PM

Hi, Have you tried using Get Class from Hit Actor and then checking if it's the class you wanted and then destroy actor after branch? Something like this maybe...

alt text alt text

getclass.png (155.9 kB)
classprint.png (33.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey all,

Thanks DonBusso, yeah I did try that and that was what was not being picked up. I worked out yesterday that my AI blueprint's collision settings were on Pawn when it should have been on BlockAll. Hopefully this helps someone :)

more ▼

answered Jun 09 '19 at 09:42 AM

avatar image

artificialname
1 1

(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