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"

How to trigger spawned actor overlap events?

Hi there!

I am trying to make a blueprint where a spawned actor triggers when overlapping a trigger in a level. However, I don't know how to get the spawned actors as Other Actor or Other Component in the blueprint when using Is Overlapping Actor / Component function. Is there a way I can make this by getting the spawned actors as something I can set as Other Actor / Other Component or some other way to achieve spawned actor generating events or used as condition when overlapping a trigger? I can't add the blueprint class from which the actor is spawned in the blueprint. Thank you for the potential solution!

Product Version: UE 4.9
more ▼

asked Mar 20 '16 at 04:53 PM in Blueprint Scripting

avatar image

48 6 9 14

avatar image JeromeParent Mar 20 '16 at 05:26 PM

I'm not sure I understand the question.

When you say Spawned Actor, you mean an actor you spawned at runtime (not placed in world in the editor)? Whether the actor was spawned at runtime or not shouldn't matter for stuff like triggers.

Can you give more details about what you're trying to do exactly (like, in the context of your game)?

avatar image TheoT Mar 20 '16 at 06:00 PM

Hi! Sorry for the lack of clarity in my question. The spawned actor is indeed an actor spawned at runtime. To give context, player spawns the actor by pressing a button, and can push the spawned actor to an area in the level that has the box trigger. I wish to do so that the it is checked whether the spawned the spawned actor is overlapping the area but unfortunately I don't know how to do this in the blueprint. That is, to refer to the spawned actor to see if it overlaps the trigger. I know how to refer to actors placed in the level to check this but I don't know how to do this with spawned actors. I don't know how to refer the spawned actor in the blueprint.

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

2 answers: sort voted first

You can do this in multiple ways.

If you don't care which pushable actor is put in which trigger (you just want a box to be on top of a pressure-plate or something), you can simply check if the actor that has just entered your trigger is of the class of your pushable actor.

You can do this by casting the "Other Actor" to the class of your pushable actor, and if it does not fail then it means whatever just entered this trigger is your pushable actor. alt text

If you do need to place a specific pushable actor in a specific trigger (triangle block goes into triangle slot, square block goes into square slot, etc), then you can do as nonimus suggested and use tags. You will need to give your spawned actor a tag as you spawn it, which can be done like this:

alt text

1.png (39.2 kB)
2.png (104.2 kB)
more ▼

answered Mar 20 '16 at 06:13 PM

avatar image

1.2k 63 33 96

avatar image TheoT Mar 20 '16 at 09:51 PM

Thanks guys! Works like a charm!

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

I suggest u mean an actor u placed in the world in the editor, or is this actor spawned during the game is playing?

Anyways an easy way to identify an actor of any kind is to set a tag.. The Actor u want to identify gets a tag under Actor->Tags Than make in ur EventOverlay a Branch that checks if the actor has the tag. Like this alt text

more ▼

answered Mar 20 '16 at 05:42 PM

avatar image

44 2 5 9

(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