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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to Destroy Multiple Actors?

Hey guys,

I'm trying to destroy an actor when it is shot, and I have compiled a blueprint that would allow me to kill an actor by line trace. However, if I want to destroy another actor, I would have to create another line trace, which is a tedious process. How can I simplify this so that I would only have to line trace by channel once?

alt text

Product Version: UE 4.8
Tags:
more ▼

asked Apr 21 '16 at 06:21 PM in Blueprint Scripting

avatar image

Doudou29236
1 1 4 3

avatar image HaxO Apr 21 '16 at 06:34 PM

To clarify, you want to destroy a second actor that is not hit by the line trace?

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

2 answers: sort voted first

Use Multi Line Trace, unlike normal trace it will continue searching actors in line after finding one until define range ends, it return array of hit results which you can use with "For Each" node to effect multiple actors

more ▼

answered Apr 21 '16 at 06:34 PM

avatar image

Shadowriver
36.5k 930 169 1111

avatar image BOBtheROSS Apr 21 '16 at 07:04 PM
avatar image Shadowriver Apr 21 '16 at 08:37 PM

So there need to tune colision chanells

avatar image Doudou29236 Apr 22 '16 at 10:06 PM

Awesome tip! But since I'm pretty new to Ue4, can you please help me out with the blueprint?

In my case when I shoot a certain cube, it despawns because the line trace executed the "Despawn" command, but when I shoot another object, I have to create another line trace for that object, because the first line trace can only execute once (it's hard to explain, but the white pentagon can only go into another pentagon once). How could I use the multi line trace in this situation?

Below, I've attached screenshots of my blueprint if it helps:

alt text

alt text

screen shot 2016-04-21 at 4.59.12 pm.png (278.3 kB) screen shot 2016-04-21 at 4.58.43 pm.png (108.5 kB)

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

alt text

more ▼

answered Apr 21 '16 at 06:34 PM

avatar image

CleanCut
2.1k 66 84 77

avatar image Doudou29236 Apr 21 '16 at 10:03 PM

Awesome tip! But since I'm pretty new to Ue4, can you please help me out with the blueprint?

In my case when I shoot a certain cube, it despawns because the line trace executed the "Despawn" command, but when I shoot another object, I have to create another line trace for that object, because the first line trace can only execute once (it's hard to explain, but the white pentagon can only go into another pentagon once). How could I use the multi line trace in this situation?

Below, I've attached screenshots of my blueprint if it helps:

alt text

alt text

(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