Creating a forest then wrapping it into a Blueprint

I don’t think so

The main level is controlling all the OSC stuff.
I just need to find an alternative to “how to reach all the actors/variables” within the sub-level, from the main level.

Your idea of Get All Actors can work, so creating the arrays from the main level after the sublevel is streamed, vs. doing the arrays within the sublevel.

I don’t really know how your OSC stuff works, but I think you’ll find it’s MUCH easier to put it in an actor in the persistent level ( rather than the level BP ), and then all the actors in streamed levels can just bind to event dispatchers in the OSC actor on begin play.

Then you don’t have to do anything! :smiley:

If you HAVE to do it with loops from a central point, then go for the ‘register with game instance’ concept. It’s still a lot easier. On begin play, the screens look for the ‘rock screen’ array in the GI and insert themselves in there. Then call an event in the GI to manage themselves. Again, less for you to do.

Yeah maybe that’s for the best, just bind everything instead of arrays/for each loops

and maybe a variable to control the “fake array position”

Thank you :slight_smile:

1 Like

If you work with the level BP, you’ll always end up with a ‘procedural’ solution. Like programming from the 70s. Do this, then do that, loop, do this etc.

But you can make all the assets understand how to manage themselves, and then you don’t have to do it. You can put the code in the assets, and then just call various dispatchers from a central point, if need be.

1 Like

Another issue I’m facing,

My method for creating an endless Camera drive, is to have 2 blocks of this jungle,
so in this method it would mean 2 instances of the level.

Then, with a box collision, when the camera (which has a collider as well) overlaps, I teleport the position forward so the whole block moves.

I don’t see an option though to move the whole level as a whole, similar to moving a blueprint where all the meshes/lights/etc in side move as well.

Is that possible?

So I basically need to
1- have a box collision within the sub-level recognize the the camera (from the main level) has collided.
2- teleport only the relevant sublevel-instance with all its content

I notice you can move the level

I don’t know how smoothly that happens? :smiley:

Do you mean making it seem like an endless runner, with two level instances swapping the whole time?..

Yes exacty how you described it.
I have a blueprint with a collider that moves with the camera,
then when the jungle-blueprint collides with it, it pushes it forward.

I need the sublevel to call the event on the mainlevel, that will push the whole level forward.
Can I reference an outside collider from the sublevel?

A little confused. If the level moves with the camera, it will look like it’s not moving?..

The trigger object moves with the camera, not the level.
Until it collides with the static collider that sits within the sublevel

1 Like

I’m thinking you mean this

When the camera reaches this collider

You want to load the next ‘tile’? Here

Is that right?

So when the camera overlaps, you cast to see what sort of actor you hit. If it’s the first collider in the sub level, then move the previous sub level to it’s new location.

So let’s say I have a collider in the sublevel,
When it overlaps, I check if it hit the right object, then,
how do I tell the main level, that something happened? so only the relevant sublevel moves?

You will know it’s a level end collider. But you will need to do something like tagging them with the level name etc so you can tell them apart. Then you can move the previous level across.

That’s my question, basically how do I call the main level from the sublevel? I tried casting to the main level but it doesn’t function like that

Thanks again

You can tag the collision boxes

Actor tags, no component tags.

The boxes in the persistent just get tagged as that ‘persistent’, otherwise ‘sublevel’. It’s just text.

Then, when your cam overlaps a box

Oh ok, so up until now I did the “on component begin overlap” within the blueprint(which is now the sublevel)

So in this case, I have to do it at the main level instead? if I get it right

Maybe we can have a chat about this later ( very hard to explain here ).

Keep your sub levels as they are, we just need a way of knowing if the thing we’ve collided with is from a sub level or the main level.

( I don’t get why there would be collision boxes in the main level, but… )

So, the easiest way to know, is to tag the sublevel boxes with ‘sublevel’.

Then, when your camera ( in the main level ) runs over them, it can see it’s a sublevel collision box.

Does it make sense yet? :slight_smile:

My camera is sort of independent, meaning the user can move it manually as well, without triggering the “teleport” function so to speak,

so imagine the user moves and hits the trigger with the camera, but the camera is just moving back and forth (and not in need to teleport the sublevel forward)

That’s why I have a separated trigger in the main level, which only moves forward if the user activates the “drive” function.

I think I get it though,
I have to set an event for the trigger in the main level,
to check if it collides with “actor has tag ‘sublevel’”
then I have to identify which sublevel it is, then move it :slight_smile:

hopefully I can do it! will update

you’re the best!

1 Like

Yes, the camera can just ignore overlaps if it’s in ‘non-drive’ mode.

Ok got it,

Trying it this way:

Sublevel → triggerbox:
image

Mainlevel triggerbox:

not working :confused: