I’m making levels which consist basically in simple boxes as rooms, so I’m putting everything within the same level to make it easier and faster to teleport the player. For ease of editing, I want all rooms relatively close together, but I don’t want the player to see adjacent rooms.
Is there an easy way to make this? I know you can make a trigger volume and set it to make meshes visible or invisible, but that would require a lot of work, specifying individual actors. So I was wondering if there’s a better way like hiding everything inside a volume or something.
Thanks. In this case it makes more sense to me to use method #2, since giving each actor a tag would require some manual work, but level streaming isn’t exactly what I want since I want all rooms in the same level map for ease of prototyping, editing, and also loading quicker in game while teleporting from one room to another.
How would you proceed though? I’m using trigger volumes to encompass entire rooms and every npc and item inside them (basically anything that’s visible within that volume), and I suppose I know how to do on begin/end overlap events from inside the level blueprint to trigger a visibility change, but I’m not sure how to search for everything that’s already overlapping a trigger volume to change their visibility, or even, on begin play, to hide everything inside all triggers except the one the player is already standing within.
Any ideas why this only shows my character and NPCs, not any parts of the room like walls, doors, interactable object blueprints, nothing?
Edit:
Pretty basic, gotta check “generate overlapping events” on everything.
So I guess I’m gonna have to manually do -something- to every actor I want to hide? be it adding tags, or checking that box, basically every single one?
heh I did forget it, I guess. but it still works since I don’t want to filter anything out, the issue was that I had to check “generate overlapping events” on everything.
Right, I’m not a big fan of adding stuff to the level blueprint either, I was actually going to make an actor blueprint for that, but I wasn’t able to add a trigger volume into a blueprint so I decided to just do it from the level blueprint. now I modified a trigger volume into this weird shape, and I’m not sure how to convert it into a box so I can add to a blueprint, since apparently you have to use static meshes as a trigger volumes to work inside blueprints. Is there a way to convert a volume into a mesh? (edit: found it)
So this works, but only with that delay, probably since it takes more time to spawn the player character than this box.
Any better way to check if the player character is already overlapping, without a delay? This shouldn’t be an issue, but I always try to avoid delays since they can get messy with more complex code, pausing, etc.
Just as a note, you can have more than one box in the BP, and it will still work with the exact same code. ( or mix box, capsule, sphere etc ).
But, if you want to use a custom mesh, then you’d need to make the box a reference to a collision volume, in the world. Then you could choose your custom mesh.
So, for this specific room, I’d have to have 4 different boxes as triggers, so I can encompass all of the room and not have these triggers affecting adjacent rooms.
Would I need to set the same code (get actor, world location, get scaled box extent, etc) for each different box component, or is there a more efficient way?
I suppose if I have different instances of the same blueprint for a weird shaped room, it will be triggered multiple times, one for each box trigger bp, instead of being triggered only once if they were all inside the same bp
Isn’t that the case? I’m not sure what you mean by grouping them together?
Just duplicate them (as child actors) and then create the shapes of the rooms you want.
I do think CLOCKWORK’s method is FAR easier.
And by “GROUP”, I mean, in the viewport of the editor, you can click multiple assets/meshes/blueprints and “connect” (don’t worry, they won’t move) in such a way that they will translate (physically move, if you move them) with each other.