Download

Is it possible to make randomly placed rooms with blueprints ?

as the title says…
i’m mainly a 3d modeller so programming is not really my thing…

Yes, if you do a search for “Procedural Dungeon” in unreal engine 4 you’ll get a lot of hits, it’s really not too difficult to create in blueprints

Unreal training streamhttps://youtube.com/watch?v=mI7eYXMJ5eI
Other users
https://www.youtube.com/watch?v=lXv1YXGMaj8

sorry it took me long to reply i was busy
those tutorials show how to make randomly generated rooms
i want to randomly PLACE rooms that are PRE-MADE…

EDIT : A good example would be SCP : Containtment Breach.

Hello,

The key to this is using Load Level Instance blueprint node. It loads instance of any level (room).

The algorythm is simple then. Each room should have it’s start snap point at 0, 0, 0. And add some sort of locator in this room, which will be used to spawn another room in that point. This “locator” blueprint should have the following logic code:

  • Get number of already generated rooms from GameMode
  • If it’s not maximum allowed - Load Level Instance (random one from folder, for example Room_XX) and increment number of generated rooms in GameMode
  • If it is max allowed - do nothing (will stop spawning new rooms)

So now you just need to generate FIRST room using GameMode or Level Blueprint. Once it’s generated, it’s Locator should spawn another room. Which, in turn, has it’s own locator, which will check number of room and spawn another one. Etc, until all rooms are spawned :slight_smile:

That’s an easy starting point, you should be able to go from here.

Using one Loop inside one tick will not let you generate multiple rooms unfortunately. But there can be other algorythms to achieve t