-
-
Notifications
You must be signed in to change notification settings - Fork 76
Room Initialization
Before validating a dungeon, you can do some initialization to the room instances generated by the dungeon.
Room instances are NOT room levels, so you do not have access to actors inside the levels.
If you want to initialize actors, you have to put your code in the BeginPlay
of your blueprint levels where you can access their room instance to initialize the actors.
Room instances do not have many thing to initialize by default, but you can extend their instance specific data by using Room Custom Data.
The first place where you can initialize instances values is inside your RoomData
child blueprints.
You can override the function Initialize Room
which is called just after the last Continue To Add Room (the one returning false) and before Is Valid Dungeon.
Inside it we can access the room instance's functions (e.g. Lock
) and its custom data.
For the examples, in the following pictures I will use a Secret Room
and a Chest
custom data but they are not provided by the plugin.
A simple example is to lock the room if it has a Secret Room
custom data.
A little more complex example is to also put a key in another room (e.g. a room with a chest) so the player will be able to unlock the secret room.
The second place where you can initialize room instances is the Initialize Dungeon
function of the Dungeon Generator.
You can do the same thing here than in the Initialize Room
above. You'll just have to get the room you want first.
The example below shows a way to initialize just one Secret Room
in the dungeon:
You can join the Discord server dedicated to this plugin if you want to share, help or ask questions about it.
Installation
Getting Started
Room Architecture
Door
Plugin Settings
Packaging
Dungeon Generator
Choose First Room Data
Choose Next Room Data
Continue To Add Room
Is Valid Dungeon
Occlusion Culling
Door Types
Room Initialization
Room Custom Data
Room Visitor
Room Observer
Console Commands
Multiplayer
Navigation Mesh
Geometry Brushes
If you like my plugin, please consider tipping: