Nope.
Why do you have main level TBs?
You need the tag checking code on the camera box
Nope.
Why do you have main level TBs?
You need the tag checking code on the camera box
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âŚ
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!
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âŚ
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âŚ
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.