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"

DestroyActor -- Any/Every Object

How can I set the target module on the DestroyActor node to destroy any object on the map? Player, static meshes, and actors?

I do not want to just set one class or specific actor. My DestroyActor is in the blueprint of an actor, a box collision.

Product Version: UE 4.9
more ▼

asked Oct 26 '15 at 07:47 PM in Blueprint Scripting

avatar image

170 48 49 60

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

1 answer: sort voted first

No idea why you'd want to do such a thing but this should work:

alt text

Use overlap event instead of J.

If you explain what you are trying to do maybe we can find a better solution because destroying everything, including the player will probably cause a lot of issues.

more ▼

answered Oct 26 '15 at 07:58 PM

avatar image

16.9k 671 167 678

avatar image nmm131 Oct 26 '15 at 08:19 PM

The player is destroyed, which is what I want partly. However when destroyed my view through the camera is snapped to a black screen, rather than displaying the scene at which the player was destroyed. It will not destroy blueprintActors though, I would like it to destroy all static meshes such as everything placed on preexisting UE4 level maps (FirstPersonExampleMap)

Basically acting as a trigger that will remove any object from the map when it overlaps the box collision.

avatar image Jacky Oct 26 '15 at 10:44 PM

It does remove everything in the level, that's why you are seeing a black screen. If you keep an eye on the World Outliner when you execute this you'll see the list cleared, except for Player Controller(which isnt a visual entity and you need it if you want to respawn a character)

avatar image nmm131 Oct 26 '15 at 10:56 PM

Ah that is confusing. So the DestroyActor will destroy everything, but how can I set this to destroy any/every class type on overlap? I'm not trying to destruct a whole map environment, just anything and everything once it passes over the box collision. So it would be great if one by one, as things passed through the box collision they destroy, so that my camera is not involved in the destruction.

By this sense of DestroyActor, as long as one thing passes over the box collision the whole map will destroy, not ONLY the object that passes over the box collision. That is why my camera gets destroyed, even though it is moving in the same direction with the same speed as the box collision!!

avatar image Jacky Oct 26 '15 at 11:34 PM

Well i am confused as well. You say you want everything destroyed when the player overlaps the actor but then you arent happy when the player is destroyed. : \

Destroy Actor alone doesnt destroy all of the actors, we are telling it to destroy actors by getting all actors of class. If you want to destroy only overlapping actors then you'll use the array output of overlap event > for each loop > destroy actors.

avatar image nmm131 Oct 28 '15 at 02:04 AM

When the pawn overlaps with the box collision, all obejcts are destroyed at the same time. I know this because in the right pane (which shows all objects on the map) after the pawn collides with the box collision, everything is removed except for player controller. The view shows what is a new level (black with gridlines)

What happens with the pawn destruction is good because the pawn does not respawn...so that destruction is great and is what I need.

However with destroying objects one by one as they hit the box collision

(basically to clean up the map when my player passes from room to room or from camera area of view to the next, since the camera moves in one direction, the box collision will destroy all objects once the player has moved on to have those objects out of view)

the problem is all objects are destroyed at once, not as they individually hit or overlap the box collision.

So there is something funny with this blueprintActorClass: because it will get all actors and destroy all of them, not the actors that actually cross the box collision -> one by one

alt text

aaaaaaa.png (274.0 kB)
(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