How to trigger spawned actor overlap events?
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!
asked Mar 20 '16 at 04:53 PM in Blueprint Scripting
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.
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:
answered Mar 20 '16 at 06:13 PM
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
answered Mar 20 '16 at 05:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here