Issues with spawning recursive blueprint.

I am making a simple random room generator.
It works via making a room, then at the doorways of the room having another blueprint that makes another room, and so on and so forth.
Currently i am working with only one room, it has a ‘entry’ arrow, and a ‘spawn’ or ‘exit’ arrow.

9fee3398739f3aa0b0d70a184981097604c3b940.jpeg
Here you can see the red arrow is the ‘entry’ arrow, and the blue arrow is the ‘spawn arrow’, for the example, i will refer to the spawn arrow in the picture as spawn arrow 2 because it is used in the second iteration (thus the program is recursive).
*they have been raised for the photograph, but should be on transform.z = 0.

When the room spawns, its transform is set to the spawn arrows transform, then the distance between its current transform and the ‘entry’ arrow is added to its current transform, in theory moving the room so that the ‘entry’ arrow lines up with the original ‘spawn’ arrow.


First try i made

e002de67a4b62ac84c399c687d73747780bf5773.jpeg
These two bits of code should do the same thing.

The result is as follows:

44ec1a42c80029e37d6a1c0b50e002f17a1f013d.jpeg
The first iteration works fine.

558f3bac406bde9728f45d3a42d8b04221e5d53b.jpeg
But then on the second time, the ‘spawn arrow’ is not placed in the same spot as in the blueprint component viewer, and sits in the middle of the room as appose to at the door.

23267eea21dc7b3bd2bf8c17c054ce007fcd3128.jpeg
Heres a picture with the arrows raised so its easier to see (note that it creates stairs- to be expected, but the arrows are alot clearer in this picture).

Id really like some advice on this, any help will earn you love. I find looking at blueprints to be confusing.

Here is some psudocode i wrote for myself to explain the process, maybe it can add some clarity to my logic.

http://pastebin.com/m2y321Ef