Overlap events for not-yet-spawned actors in level?

Hello all, I’m trying to create an overlap event for an actor that is not placed in the level and only spawns when another event is run. When the player overlaps that actor it’s supposed to spawn an objective at a specific location on the map that the player should go.

The problem is i can’t make an Overlap event for this actor in the level blueprint because it doesn’t exist in the level yet, and i can’t make the Overlap event in the actor’s own blueprint because there’s no way (that i know of) to get a reference to a level inside a blueprint so that means i can’t tell the level where to spawn the objective.

I don’t know what else to do, is there a better way of doing this?

What is that specific location? If it’s just a world coordinate, it might a matter of keeping a variable in the dynamically spawned actor. Would that work? Or you need something more involved?

For something more involved, I’d use a dispatcher - sounds like a perfect use scenario.

an overlap event for an actor that […] spawns when another event is run

Where is that another event? And who knows where that special location is?

So that location is a pivot/scene component in another blueprint actor which is placed in the level from the start, so i will need to get a reference to that instance of the actor and get its component’s world transform, which will be where the objective spawns.

As for that other event which spawns the overlapped actor, it’s inside the level blueprint, because this actor will also spawn at specific locations (same as above, but different set of locations) in the level.

I’ll try look into the dispatcher, thanks!

I see. In that case, give the another blueprint that is placed in the world a specific tag. Both Actors and Components can be tagged:

image

A dynamically spawned actor can then find anything tagged:

But there may be an easier and more elegant way. Perhaps this Event (or the event’s owner) already knows about the specific location the player should go to. Does it?

Not exactly, i’m trying to make a game with randomized objectives, there is a list of pre-set locations, but only one of them will spawn the objective at a time. But i’ll give tags a try as well, thanks!

Ah, yeah you may need to use tags :expressionless: