A Blueprint which adds a blueprint, then gets its variables?

Hey guys.

I’m investigating how to get some simple procedural buildingblock levels going on. i’ve made a * Room * blueprint with a few meshes in it, and added a visible vector var to act as an * attatchment point *

then i made another blueprint, with an AddChildActorComponent node which adds a Room blueprint.

what i would like to do, is get at the vector var inside this blueprint i’ve added dynamically, so i can use it as a location to add the next Room blueprint, and so on and so forth.

however i can’t seem to get at the vector var in the dynamically added blueprint. i have looked at GetChildActor but it doesnt seem to do what i need. can anyone think of a way to get at the vector vars inside this dynamically spawned blueprint? or maybe there is another kind of component i should use?

Has the reference you hold to the dynamically added blueprint been cast to the appropriate type of blueprint or is it just a generic actor?

i went and read about casting… still not sure how to use it. this is what i did to start with…

i understand that casting would allow me to “expect” a variable to be available based on a template… but i have no idea how that would work in this case.

here i’ve shown the component setup of the Room1 blueprint on the left, and on the right - is this how i would cast to the appropriate blueprint type?

even if that casting stuff is correct - still no idea how i can get at those vectors within the room1 blueprint

I see what you mean. Are there no components for retrieving public properties from a variable if you drag off from the “As room1 C” pin?

ok, fiddled some more, and found out how to get to the stuff i need using casting, but this setup is still not working as desired.

the debug print node outputs 3 different locations as expected, but the newly added room1 blueprints are not being moved to those positions
(changed Room1’s “attatch point” object to a scene object instead of a vector var, in order to get a transform)

the print node outputs:
LogBlueprintUserMessages: X=792.000 Y=-632.000 Z=128.000
LogBlueprintUserMessages: X=944.000 Y=-1392.000 Z=256.000
LogBlueprintUserMessages: X=968.000 Y=-1512.000 Z=384.000

after some more fiddling, if i tick manual attatchment on the add node, the meshes are moved into position…

success! this setup creates a simple procedural level, choosing between two attachment points on each added room

of course it can overlap itself etc, plenty of logic needed before its any good.