# Dungeon Architect

**URL:** <https://forums.unrealengine.com/t/dungeon-architect/28094>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [April 22, 2015, 12:27pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094 "2015-04-22T12:27:43Z")\
**Posts on this page:** 20\
**Page:** 57

<div class="post-metadata">

**Author:** ![Laurentius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Laurentius](https://forums.unrealengine.com/u/Laurentius)\
**Post date:** [October 18, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1137 "2016-10-18T16:35:24Z")

</div>

> [@;611093](#):
>
> @Laurentius, @DrinkThisPotion
> 
> 1. The latest version 2.2.0 (soon to be updated in the marketplace) has an API and samples to find the furthest rooms in the dungeon
> 
> 2. You can use the Query API (in the examples) to orient the playerstart away from the entrance
> 
> 3. @DrinkThisPotion’s suggestion would work but it requires some work for properly wrapping theme override volumes around it. You can do that with a dungeon event listener (will work for dynamic runtime dungeons too) where you listen for dungeon layout build event (where the layout is built but the theme is not applied) and place the volume around it. I have a sample for this in Unity. I’ll add a demo soon

As I bought DA from your website I already have version 2.2 - those Query API example blueprints look very promissing. I’ll have a look into those to learn from them. Very nice!

And I’m really looking forward for the dungeon event listener sample. It sound like the solution for getting control over prefab rooms.  
A mix of the snap builder algorithm (creating the prefab room inside a separatly themed level with door indicators) and the grid builder algorithm to connect to the random level with those prefab parts would be more convenient, I think.  
But maybe this workaround with the dungeon event listener is enough …

Thanks for your fast answers and this outstanding plugin - there are so many things hidden inside it and I really dig the samples and videos you provide!

---

<div class="post-metadata">

**Author:** ![DrinkThisPotion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrinkThisPotion](https://forums.unrealengine.com/u/DrinkThisPotion)\
**Post date:** [October 18, 2016, 4:53pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1138 "2016-10-18T16:53:57Z")

</div>

> [@;611132](#):
>
> The new version (2.2.0) has a new query system that will hide the low level data structures in the model and give you a easier system to work with. are a list of functions in the query object of the grid builder which you can call from a blueprint
> 
> [FONT=Courier New]   
> GetCells  
> GetCellsOfType  
> GetCellDimension(int32 CellId, FVector& OutCenter, FVector& OutSize);  
> GetPathBetweenCells(int32 CellA, int32 CellB, TArray\<int32\>& OutResult, bool& bOutSuccess);  
> GetFurthestRooms(int32 &OutRoomA, int32 &OutRoomB);  
> GetCellAtLocation(const FVector& WorldLocation, int32& OutCellId, bool& bOutValid);  
> GetCellType(int32 CellId);  
> GetRandomCell();  
> GetRandomCellOfType(FCellType CellType);  
> GetRandomCellFromStream(FRandomStream& RandomStream);  
> GetRandomCellOfTypeFromStream(FCellType CellType, FRandomStream& RandomStream);  
> ContainsStairBetween(int32 CellA, int32 CellB);  
> ContainsDoorBetween(int32 CellA, int32 CellB);  
> GetStairBetween(int32 CellA, int32 CellB);  
> GetDoorBetween(int32 CellA, int32 CellB);  
> GetOpeningPointBetweenAdjacentCells(int32 CellA, int32 CellB);
> 
> I’ll add more on request

These functions look great. I need some basic info before I can use some of them, though.

Some basic questions I couldn’t find docs on:  
What do Grid X and Y refer to in terms of the grid structure? Would (0,0) be the bottom leftmost cell on the grid?  
What does Grid Cell Size refer to?  
How would I determine how many cells are in the entire grid?

Is there a function which tells which dungeon floor a cell belongs to? I could use that to adjust the positions of the door into a runtime dungeon. Not elegant but it would work.

---

<div class="post-metadata">

**Author:** ![arvinmoses](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@arvinmoses](https://forums.unrealengine.com/u/arvinmoses)\
**Post date:** [October 18, 2016, 4:58pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1139 "2016-10-18T16:58:23Z")

</div>

Hi guys! started using DA on a small indie project with a few friends. Really impressed by it so far and looking forward to doing more projects with it.

As far as custom selectors - we’re really curious about trying to get some more variety on levels…

I haven’t messed with blueprint spawners much but somethings we are looking for would be things like:

Corners - convex or concave corners.  
Cells that are not 1x1. So maybe being able to get room center and creating a cell that is a 2x2.  
Also something to mix the snapping system with the grid builder. Not sure how feasible it is - but it would be nice to use the grid system and randomly be able to pull in a level like the snap system as a volume. Not sure if that makes sense.

Oh credit where it’s due - project using DA of course, [Fantasy Dungeon Kit](https://.unrealengine.com/marketplace/fantasy-dungeon), [Skeleton Character Pack](https://.unrealengine.com/marketplace/skeleton-character-pack), and [Gametextures.com](http://.gametextures.com)

 ![3d1c4b8b090fc6e7c24171a9547e00f0863c4499.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/1/3d1c4b8b090fc6e7c24171a9547e00f0863c4499.jpeg)  
 ![a86c5c627d319e096b610d2542d5106f882f2e80.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/6/a86c5c627d319e096b610d2542d5106f882f2e80.jpeg)  
 ![8df60091e5f60d6360764fd83e1fb5f0da4fd05e.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/f/8df60091e5f60d6360764fd83e1fb5f0da4fd05e.jpeg)

Sorry no info page yet - just the KS https://.kickstarter.com/projects/triverske/2070972665?token=6f6eb4c9

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [October 18, 2016, 5:45pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1140 "2016-10-18T17:45:14Z")

</div>

> [@;611062](#):
>
> , the emitter BP can see your variables from code. You need to add a reference to your C++ actor that drives this variable and read it from there
> 
> 's an example where from the BP, I’m grabbing the distance (random value between 1-6) from C++
> 
> C++ code that drives the distance variable:  
> **AMyDungeonController.h**
> 
> ```auto
> 
> #pragma once
> #include "AMyDungeonController.generated.h"
> 
> UCLASS(Blueprintable)
> class AMyDungeonController : public AActor
> {
> GENERATED_BODY()
> 
> public:
> 
> UFUNCTION(BlueprintCallable, BlueprintPure, Category = MyDungeonController)
> int32 GetMountainDistance();
> 
> };
> 
> ```
> 
> **AMyDungeonController.cpp**
> 
> ```auto
> 
> #include "DA413X.h"	// pch
> #include "AMyDungeonController.h"
> 
> int32 AMyDungeonController::GetMountainDistance()
> {
> return FMath::RandRange(1, 6);
> }
> 
> ```
> 
> Add a variable in the emitter BP that takes a references to your controller code and make it public
> 
> Grab the distance from your C++ code
> 
> Finally, set the reference of your C++ code in the marker emitter when you register it in the Dungeon actor. (The assumption is that you have it somewhere placed in the level, which you probably do)
> 
> Clicking build now randomly generates rocks that are 1-6 layers deep

Hey !

Thanks for your answers !

Problem 1 (instancing ultimate rock pack): as i said in a previous post, don’t waste your time on this (unless you need to understand what happened), i solved it experimentally by modifying the collisions. I didn’t understand anything but the problem is solved for me 🙂

Problem 2 (accessing c++ variable from BP): your assumption is the core of the problem 🙂

Unfortunately i spawn the dungeons at runtime so no, i don’t have them placed in the level, it’s the problem. I need a way to set the DungeonCppCode variable at runtime !

If i had the hand on the code, i would probably declare a public (visibleanywhere, blueprintreadonly) pointer/ref to the ADungeon in the emitters and set it as “this” when adding the emitter to the dungeon.

Your DungeonMarkerEmitter.h code would become something like:

```auto

class DUNGEONARCHITECTRUNTIME_API UDungeonMarkerEmitter : public UObject
{
	...]

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Dungeon)
	AActor* ParentDungeon;

	...]
}

```

And when adding the emitter in my dungeon class (inheriting from ADungeon), my own code would become:

```auto

// emitter
FString StrEmptySpaceDAEmitter = "Class'/Game/DLCDaDungeons/EmptySpaceThemes/Rules/MarkerEmitter/BPM_EmptySpaceEmitter.BPM_EmptySpaceEmitter_C'";
UClass* UClassEmitter = LoadObject<UClass>(NULL, *StrEmptySpaceDAEmitter);

// create an object from this BP class
UDungeonMarkerEmitter* DAEmptySpaceEmitter = NewObject<UDungeonMarkerEmitter>(this, UClassEmitter);

// if ok, use it
if (DAEmptySpaceEmitter)
{
	MarkerEmitters.Add(DAEmptySpaceEmitter);
	DAEmptySpaceEmitter->ParentDungeon = this; // YEEHAAA !!!
}

```

That would be a way to expose the owner dungeon in the emitters BP, then i would just grab it, cast it to my own inheriting class and become king of the world.

But i don’t have the hand on your code^^ and maybe there is a simpler way to do this from BP without modifying the code (couldn’t reach the owner ADungeon from the emitter BP though, hence the post ^^)

Cheers

---

<div class="post-metadata">

**Author:** ![RedSaturnSix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RedSaturnSix](https://forums.unrealengine.com/u/RedSaturnSix)\
**Post date:** [October 18, 2016, 10:32pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1141 "2016-10-18T22:32:34Z")

</div>

> [@;611104](#):
>
> @RedSaturnSix I’ll add detailed video tutorials soon. In the mean time, the [snap builder](http://coderespawn.github.io/dungeon-architect-user-guide-ue4/stage/html/user_guide_2.0.html#snap-builder) section in the user guide has info to get you started

Thanks!

---

<div class="post-metadata">

**Author:** ![dave\_sullivan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dave\_sullivan](https://forums.unrealengine.com/u/dave_sullivan)\
**Post date:** [October 18, 2016, 10:43pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1142 "2016-10-18T22:43:23Z")

</div>

plugin, really enjoying it so far.

I’m having some problems using this in a multiplayer game. Simply adding it to the level doesn’t seem to work, I suspect because it’s generating the meshes at runtime and replication isn’t being accounted for. I end up getting spammed with error messages when my client player hits a collision on the dungeon. I get “LogNetPackageMap:Warning: UPackageMapClient::InternalLoadObject: Unable to resolve default guid from client: PathName: HierarchicalInstancedStaticMeshComponent\_1237, ObjOuter: NULL” spammed across my server log.

Main question: What are we supposed to do to make replication work?

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [October 19, 2016, 5:45am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1143 "2016-10-19T05:45:58Z")

</div>

> [@DrinkThisPotion;610684](#):
>
> Hey fellow DA enthusiasts - does anyone want to share notes on what we’ve learned? I’ve gone through all the videos and done quite a bit of experimentation on my own. I have some learned some pretty neat tricks, but I’m also up against what seem to be some limitations. I plan to make some tutorial videos on some of the finer points I’ve learned. I’ll share those when I finish them.
> 
> Has anyone gone advanced with building your own marker emitters? I built one to emit in the center of rooms which is working very well. However I’m very interested in going deeper as it seems the possibilities are powerful.
> 
> Specifically, when getting the bounds of rooms and corridors, does anyone understand that model very well? I’d love to chat.
> 
> If anyone’s interested, 's a blueprint marker emitter I made for the center of the room. It is based on one of the DA author’s demo emitters with few a very minor tweaks.
> 
> ![roomcenteremitter.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/a/32ab989c149f8b7301bcaf326d7a6042042ff85e.png)

Hello,

Great idea !

It would be nice to share some useful emitters.

So 's one.

I have modified’s AdjacentCellEmitter to allow some walls (and wall separators) in the empty space:

 ![EmptySpaceNoWalls.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/6/36d96963845be03975359725d0ed15e36481d3a9.jpeg) ![EmptySpaceWalls.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/9/596f0027d95787d895ab9f25d09da72d4bfded33.jpeg)

it is in action:

https:///watch?v=dxsae7abmfA

The function i have added is a bit too long to simply share screenshots, so you can download the asset .

In case the link would die some day, i show the whole function screen by screen slowly at the end of the video, so you can remake it by pausing and copying the video.

This emitter seems to work but it’s not optimized nor complete (see video), so if anyone comes up with a more efficient or more complete way to do it, please don’t forget to share 🙂  
Cheers !

---

<div class="post-metadata">

**Author:** ![demonseedgfx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@demonseedgfx](https://forums.unrealengine.com/u/demonseedgfx)\
**Post date:** [October 19, 2016, 9:36am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1144 "2016-10-19T09:36:02Z")

</div>

[QUOTE=;611041]  
@demonseedgfx, @MiDri suggestion is a nice workaround. 's another approach that lets you rotate your dungeon at runtime by attaching all the dungeon objects to a root actor:

1. Generate your dungeon
2. Grab all your generated dungeon actors and attach them to some root actor (which you will rotate around the orbit)
3. Rotate the root actor to rotate your dungeon

Amazing Service there. That looks like the perfect setup. Thanks

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [October 19, 2016, 2:44pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1145 "2016-10-19T14:44:22Z")

</div>

@uced, You can access your blueprint variables from C++ ([link](https://answers.unrealengine.com/questions/161741/accessing-blueprint-variables-through-c.html))

Alternatively, you can code up your marker emitter within C++ itself, if you don’t want C++ to blueprint communications.

You would derive from UDungeonMarkerEmitter

**MyDungeonEmitter.h**

```auto

class UMyDungeonEmitter : public UDungeonMarkerEmitter
{
	GENERATED_BODY()
public:
     virtual void EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query) override;

};

```

**MyDungeonEmitter.cpp**

```auto

#include "DA413X.h"	// pch
#include "MyDungeonEmitter.h"

void UMyDungeonEmitter::EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query)
{
   // your logic 
   // Emit markers like this
   
	FTransform transform;
	Builder->EmitMarker("MyMarkerName", transform);
}

```

This way your code class is statically types and you can reference and set the variables of this class from your code while adding the emitter to the dungeon actor

```auto

// create an object from this BP class
UMyDungeonEmitter* DAEmptySpaceEmitter = NewObject<UMyDungeonEmitter>(this);

// if ok, use it
if (DAEmptySpaceEmitter)
{
	MarkerEmitters.Add(DAEmptySpaceEmitter);
	DAEmptySpaceEmitter->MyAttribute = MyValue; // directly reference and set anything you like 
}

```

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [October 19, 2016, 3:16pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1146 "2016-10-19T15:16:14Z")

</div>

> [@DrinkThisPotion;611123](#):
>
> Is there documentation anywhere on the dungeon model and dungeon layout? A diagram showing how the XY grid works and how the rectangular bounds are formed and stored would be very helpful.

The cell locations start from the corner. They are saved in logical grid coordinates and later multiplied with the Grid Size (specified in the config) to get the world coordinates

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/4/8447865c87f3729ef70ca75ad7cc3ad80a41a731.png)

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/e/d0e56fccb8ceaaeef73e541e3e6b77b0df8076f4.png)

---

<div class="post-metadata">

**Author:** ![DrinkThisPotion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrinkThisPotion](https://forums.unrealengine.com/u/DrinkThisPotion)\
**Post date:** [October 19, 2016, 3:44pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1147 "2016-10-19T15:44:20Z")

</div>

> [@;611670](#):
>
> The cell locations start from the corner. They are saved in logical grid coordinates and later multiplied with the Grid Size (specified in the config) to get the world coordinates
> 
> [http://i.imgur.com/1EGnxH2.png](http://i.imgur.com/1EGnxH2.png)
> 
> [http://i.imgur.com/7gyn7ck.png](http://i.imgur.com/7gyn7ck.png)

This is super helpful!!! Thank you!!!

---

<div class="post-metadata">

**Author:** ![DrinkThisPotion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrinkThisPotion](https://forums.unrealengine.com/u/DrinkThisPotion)\
**Post date:** [October 19, 2016, 3:52pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1148 "2016-10-19T15:52:35Z")

</div>

> [@uced;611465](#):
>
> Hello,
> 
> Great idea !
> 
> It would be nice to share some useful emitters.
> 
> So 's one.
> 
> I have modified’s AdjacentCellEmitter to allow some walls (and wall separators) in the empty space:
> 
> it is in action:
> 
> watch?v=dxsae7abmfA
> 
> The function i have added is a bit too long to simply share screenshots, so you can download the asset .
> 
> In case the link would die some day, i show the whole function screen by screen slowly at the end of the video, so you can remake it by pausing and copying the video.
> 
> This emitter seems to work but it’s not optimized nor complete (see video), so if anyone comes up with a more efficient or more complete way to do it, please don’t forget to share 🙂  
> Cheers !

Wow, thanks for sharing - this is really cool and useful. I have been using’s EmptySpace emitters and your emitters would appear to be a very useful addition for many theme types. Looks like you have built some really nice themes too!!

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [October 19, 2016, 3:54pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1149 "2016-10-19T15:54:00Z")

</div>

> [@anonymous\_user\_a8cdcc08e\_sullivan;611341](#):
>
> plugin, really enjoying it so far.
> 
> I’m having some problems using this in a multiplayer game. Simply adding it to the level doesn’t seem to work, I suspect because it’s generating the meshes at runtime and replication isn’t being accounted for. I end up getting spammed with error messages when my client player hits a collision on the dungeon. I get “LogNetPackageMap:Warning: UPackageMapClient::InternalLoadObject: Unable to resolve default guid from client: PathName: HierarchicalInstancedStaticMeshComponent\_1237, ObjOuter: NULL” spammed across my server log.
> 
> Main question: What are we supposed to do to make replication work?

@dave_sullivan You can create a DungeonEventListener blueprint and override the OnPostDungeonBuild event. In that event grab all the actors spawned in the dungeon and set the replicate parameter. I’ll provide a BP example tomorrow.

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [October 19, 2016, 3:54pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1150 "2016-10-19T15:54:53Z")

</div>

> [@uced;611465](#):
>
> Hello,
> 
> Great idea !
> 
> It would be nice to share some useful emitters.
> 
> So 's one.
> 
> I have modified’s AdjacentCellEmitter to allow some walls (and wall separators) in the empty space:
> 
> ![EmptySpaceNoWalls.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/6/36d96963845be03975359725d0ed15e36481d3a9.jpeg) ![EmptySpaceWalls.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/9/596f0027d95787d895ab9f25d09da72d4bfded33.jpeg)
> 
> it is in action:
> 
> https:///watch?v=dxsae7abmfA
> 
> The function i have added is a bit too long to simply share screenshots, so you can download the asset .
> 
> In case the link would die some day, i show the whole function screen by screen slowly at the end of the video, so you can remake it by pausing and copying the video.
> 
> This emitter seems to work but it’s not optimized nor complete (see video), so if anyone comes up with a more efficient or more complete way to do it, please don’t forget to share 🙂  
> Cheers !

Looking really nice . Thanks for sharing

---

<div class="post-metadata">

**Author:** ![DrinkThisPotion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrinkThisPotion](https://forums.unrealengine.com/u/DrinkThisPotion)\
**Post date:** [October 19, 2016, 4:41pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1151 "2016-10-19T16:41:25Z")

</div>

> [@;611691](#):
>
> @dave_sullivan You can create a DungeonEventListener blueprint and override the OnPostDungeonBuild event. In that event grab all the actors spawned in the dungeon and set the replicate parameter. I’ll provide a BP example tomorrow.

I just replicate the seed and call the build dungeon function on the client OnRep seed. That way I don’t have to replicate the individual actors.

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [October 19, 2016, 6:57pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1152 "2016-10-19T18:57:36Z")

</div>

> [@;611653](#):
>
> @uced, You can access your blueprint variables from C++ ([link](https://answers.unrealengine.com/questions/161741/accessing-blueprint-variables-through-c.html))
> 
> Alternatively, you can code up your marker emitter within C++ itself, if you don’t want C++ to blueprint communications.
> 
> You would derive from UDungeonMarkerEmitter
> 
> **MyDungeonEmitter.h**
> 
> ```auto
> 
> class UMyDungeonEmitter : public UDungeonMarkerEmitter
> {
> GENERATED_BODY()
> public:
> virtual void EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query) override;
> 
> };
> 
> ```
> 
> **MyDungeonEmitter.cpp**
> 
> ```auto
> 
> #include "DA413X.h"	// pch
> #include "MyDungeonEmitter.h"
> 
> void UMyDungeonEmitter::EmitMarkers_Implementation(UDungeonBuilder* Builder, UDungeonModel* Model, UDungeonConfig* Config, UDungeonQuery* Query)
> {
> // your logic 
> // Emit markers like this
>    
> FTransform transform;
> Builder->EmitMarker("MyMarkerName", transform);
> }
> 
> ```
> 
> This way your code class is statically types and you can reference and set the variables of this class from your code while adding the emitter to the dungeon actor
> 
> ```auto
> 
> // create an object from this BP class
> UMyDungeonEmitter* DAEmptySpaceEmitter = NewObject<UMyDungeonEmitter>(this);
> 
> // if ok, use it
> if (DAEmptySpaceEmitter)
> {
> MarkerEmitters.Add(DAEmptySpaceEmitter);
> DAEmptySpaceEmitter->MyAttribute = MyValue; // directly reference and set anything you like 
> }
> 
> ```

As always, a spot on answer, it works super well !

Thanks again for you patience and first class help 🙂

 ![FillingDistance.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/2/82723f046e5648e38949b391d422773f28c946e4.jpeg)

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [October 19, 2016, 8:58pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1153 "2016-10-19T20:58:12Z")

</div>

> [@DrinkThisPotion;611690](#):
>
> Wow, thanks for sharing - this is really cool and useful. I have been using’s EmptySpace emitters and your emitters would appear to be a very useful addition for many theme types. Looks like you have built some really nice themes too!!

Thanks^^

I corrected a bug i found in my function.

I was emitting many times (as much as the distance covered ! Ouch !!) the same walls. I couldn’t see it while walls were 90° oriented (as they covered each other perfectly) but the horrible truth appeared when setting a random orientation !

So i added an array of vectors to check if anything has already been emitted at a location.

The array is cleared in the event graph and is the correction in the function:

 ![EmptySpaceWallsEmitterCorrection.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/0/a04eab458ede46d630cfe562a8163e7b8ab33800.jpeg)

The corrected asset has been [reuploaded](http://yagame.fr/wp-content/uploads/YagCurrentVersion/BPM_EmptySpaceEmitter.uasset) 🙂

Cheers

---

<div class="post-metadata">

**Author:** ![JayKavanagh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JayKavanagh](https://forums.unrealengine.com/u/JayKavanagh)\
**Post date:** [October 19, 2016, 10:13pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1154 "2016-10-19T22:13:38Z")

</div>

Hey, just wanted to let you know DA has finally shown up in my vault. So where ever i was on the list epic is finally getting to that point.

Thanks alot for getting them to make it part of our vaults. 😃

---

<div class="post-metadata">

**Author:** ![HInoue](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HInoue](https://forums.unrealengine.com/u/HInoue)\
**Post date:** [October 21, 2016, 2:06am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1155 "2016-10-21T02:06:58Z")

</div>

Hey, I know you’re juggling hundreds of things at once, but I noticed a simple city generator on the DA roadmap, and I was wondering if you had a rough estimate for when that would be complete? Our team is rapidly approaching a benchmark where we have to decide whether or not we’ll have randomized districts within our city, and it’d be super helpful to be able to see whether what you’re working on suits our use case 🙂

---

<div class="post-metadata">

**Author:** ![RogueFactor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RogueFactor](https://forums.unrealengine.com/u/RogueFactor)\
**Post date:** [October 21, 2016, 3:13pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1156 "2016-10-21T15:13:21Z")

</div>

Hey, I’m very interested in using Dungeon Architect. I think it falls very well into our workflow. However, I’m a little bit worried about the fact that I get my engine out of the Epic Perforce, and therefore my UE4 versions are a little screwy, and are not even in the Epic Games Launcher.  
All this to say that if I purchase your plugin, I most probably won’t be able to run it as is and would need to recompile it on multiple occasions.  
Is providing source code an option for you? That would allow us to recompile everything as needed.

[Previous page](https://forums.unrealengine.com/t/dungeon-architect/28094.md?page=56)

[Next page](https://forums.unrealengine.com/t/dungeon-architect/28094.md?page=58)
