How to trigger an event when streaming level loads?

It might be a couple of things.

  1. Does it work normally ( without streaming )?

Overlap on begin play doesn’t work like it used to. You don’t get an overlap if the items are already overlapping.

  1. Is your player placed in each streamed level, or is it in the persistent, or do you spawn it?

If you’re spawing, you can have all sorts of timing problems. Can you say a bit more about it?

I am trying to trigger an event based on the player location when I load in a streaming level. I am using actor overlaps and trigger volumes to do this. I have set the trigger volume to update on load but the event will not trigger when the level streams in. I have the collisions set as shown.

311968-collision-settings.jpg

  1. No, even if it is done as a stand alone level it will not register the overlap and play the audio file.
  2. The player is loaded into the persistent level with a player start. The event level is then streamed in and out through a menu command. Depending on the player location it is intended for trigger volumes to “read” the player location and play a certain event. Everything works as it should if the player leaves the initial volume, but it will not register the player’s overlap when the level loads.

I have some vague recollection of a check box somewhere to enable this, but can’t find a reference now.

In any event, but default, two overlapping objects will no longer trigger BeginOverlap on begin play.

You’ll need to use on of the IsOverlapping… nodes instead I’m afraid.

It sounds like that’s your problem. Tell me how it goes…

The check box is shown in the image above. It is the ‘Generate Overlap Events During Level Streaming’. The description for this box is “If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load. You might enable this is in the case where a streaming level loads around an actor and you want Begin/End overlap events to trigger”. Based on this my interpretation is that the actor will trigger the event using BeginOverlap events.

With that said, your IsOverlapping suggestion works but it is irregardless to this check box, which means to me it would work even if this was not an option. While I may be able to create a work around for what I am doing by using the IsOverlapping I would have to first run a check on all trigger boxes and then switch to BeginOverlap to allow for transitions between the events. Possible but a lengthy blueprint for something that could be done with BeginOverlap if the description provided by the check box on the trigger volume was correct.

Thanks for the help so far and I may be over complicating this. To simplify what I’m doing, I’m trying to find a way to load a level to recognize where a player is at, play the corresponding sound and then allow the player to move between sections, triggering new sounds as the player moves.

Where IS that checkbox!?, can’t find it myself…

I need a little more info.

So, you load a stream level, and you want to know where the player is. Can then be absoltely anywhere, or only a few fixed spots?

The checkbox is under the trigger volume details in the collision settings. I’ve attached an image below showing the full description, unlike the previous image.

As for the concept it is basically what I have described. I have a interior environment so the player can be anywhere within those bounds. I will have a set of audio experiences that the player can select from a menu. I am then loading the audio ‘level’ based on their selection. As the level loads I need the correct audio file to play based on the player location and then switch between files as the player moves around the environment.

My current setup works perfectly with the exception of the start of the level. It will not start the audio file until the player moves into another trigger volume. However, I understand that the setting I have shown in the image is suppose to cause a trigger for Begin/End events at the level load. It is not working, though.

Ah… I was looking on a collision box in a blueprint… :slight_smile:

I guess you could add an extra bit of code to move the box, but that’s the same as using ‘is overlapping’.

I must admit, I moved over to is overlapping because of this sort of thing…

Watch out with delay nodes. You don’t know how it’s going to run on a much slower machine. It’s usually better to wait for a particular thing to happen, then you know things are ready.

If you check to make sure sure the overlap is happening with the player character is will work. I also had to add a delay so the level could load and call for a variable before playing.

1 Like

Thank you