Creating a forest then wrapping it into a Blueprint

Nope. :slight_smile:

Why do you have main level TBs?

You need the tag checking code on the camera box :joy:

But what if I don’t want my camera to be the trigger object?
I want to have a separated triggerbox for that, which moves forward with the camera as well.

You cam is not the trigger, the camera, is the sensor. It needs a collision box to ‘find’ any other boxes ( whether they are in the main or sub level ).

Until now I didn’t need to involve my camera in the trigger actions at all.

I just worked with two triggerboxes that reference each other.

So one triggerbox is like a dummy, a blueprint called “actiontrigger”, moving with the camera,
and the other triggerbox is in the relevant mesh-blueprint, the one which usually has to teleport, looking like this:

I’m totally lost now.

There’s probably 100 ways of doing this. But basically something with boxes and moving or spawning levels will do the trick.

I really don’t get your method. It might make perfect sense, but I’m not getting it.

We can have a chat about it later if you get stuck, but for now I have to bail… :rofl:

1 Like

haha totally my fault here - that’s me being a designer and not a programmer, so I approach things in my own twisted way that’s usually completely useless.

This wasn’t a waste of time though, I think you totally nailed it and I will figure it out!

1 Like

Quick update:
The triggers work! just as you suggested with using the tag from the sublevel.

However, moving the whole sublevel doesn’t work.
If I connect the Set Transform directly from the Level-Stream node like your previous screenshot, it works:

But, if I instead add the levels to an array, or even a single stream instance to a variable, and call it later via the get node, it won’t work.

(seems like it can be a known issue where that feature doesn’t work?)

Hmm, it should work, can you show your code for populating the array?

Setup

Execution (just for testing purposes I set new a fixed position for all sublevels)

One post online states that it won’t work in PIE but in the game it should, didn’t get to try it yet.

But this move all levels down 8000 in Z, is that the idea?

This is just to see if I can move the levels at all, it doesn’t work

I will try it, but a bit later…

1 Like

One thing I didn’t see mentioned while scrolling.

Out of any reference variable/contents aren’t ever accessible. always cast to the class and validate. Then you can access things within the instance…

I didnt read the 50 or so posts since last night, so that could have been mentioned…

1 Like

here it’s mentioned that it’s a bug, but was in 2015

Afaik levels should have a root element that you can offset around too.
And/or you could parent all the objects in the level to a custom actor with a gameplay tag and achieve the same result… after casting, validating, accessing the actor and moving it around.

I can’t find information about Afaik levels or how it’s different from Streaming levels,
do you have maybe a source about this?

Also regarding casting, the only reference I find that makes sense to cast to (when going through the array of streamed levels) doesn’t make it work:

I am also not able to get/reference any actor from the streamed level

Thank you all for this, maybe I’m missing some key nodes

lol.
As Far as I Know.

Usually, that’s a sign that either the cast isn’t working, or the object you are casting isn’t the correct one.

For instance, to access variables set in a level blueprint, you’d have to cast to the level, not the streaming instance.

What is “all levels” an array of?
Maybe, the starting point is the problem here.

The other way, where you create an actor and tag it, you can “get all actors with tag”, then cast to the actor, and move it.

“all levels” is an array of a streamed level:

nothing else on the list of “cast to” made sense so I’m not sure what would be the right actor type:

Try this node:

IF it works. install debug symbols, create a C++ project, double-click the node, and read the code on the function that converts from the reference to do stuff with to see what it’s using.

Also worth noting. You can define a custom class for the level streaming to take, which would make variables available to it. Exactly what constitutes a valid class type, no idea…

Sadly anything code related and I’m out haha I am not the best programmer nor have enough experience to find the answer.

Normally when I spawn a blueprint and add it into an array, I can access its variables without casting, just by grabbing an instance from the array I can get the variables right away, not sure why with levels it’s not the case.

Will keep on trying or find another solution.

Thanks again for all your help.