Announcement

Collapse
No announcement yet.

Kill enemy by looking in its direction

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

    Kill enemy by looking in its direction

    I want to set up a scenario where i can kill an enemy by making my first person camera look in the direction of the enemy if its within a certain distance automatically (no key pressed), i think i have to use line tracing based on this video https://www.youtube.com/watch?v=DTNO4kULts4

    but im not sure how to go about creating an enemy death bp and attaching it to that, if anybody can help me with this that would be great.

    #2
    At 1:34 in that video, where he breaks the Out Hit, drag off from Hit Actor and search "Destroy Actor".

    Comment


      #3
      Originally posted by Jamie95 View Post
      At 1:34 in that video, where he breaks the Out Hit, drag off from Hit Actor and search "Destroy Actor".
      Perfect! thanks a lot!

      Comment


        #4
        One more thing, is it possible to set it to only destroy objects and enemies that are using a specific material?
        Last edited by drakolio; 08-21-2017, 06:03 AM.

        Comment


          #5
          Yes, in "Break Hit Result" use Out Hit Phys Mat.
          Click image for larger version

Name:	SS.png
Views:	1
Size:	56.1 KB
ID:	1132725

          Comment


            #6
            Thanks ill try this now

            Comment


              #7
              Weird, the feature to look at the enemy and kill it by line trace was working perfectly last night in my other project, but doesnt seem to be working here even though its the same project just duplicated and the script is copy and pasted. can you see what ive done wrong by looking at this?

              Click image for larger version

Name:	killbylook.jpg
Views:	1
Size:	226.3 KB
ID:	1132728

              Comment

              Working...
              X