reading and "storing" custom variables of multiple other blueprint into a array?

Currently i’m trying to make a construction script that uses set variables of other blueprints in the level to control a DIM material, however currently i find myself unable to call the variables.
The amount of blueprints containing the needed info will vary. though i am able to call/store/read/use the world location of each blueprint, any custom variables i added i cant seem to gather.

The problem i have could be seen as trying to “reverse cast” information from multiple blueprints into a master blueprint.

for example, in the scene i would have the following objects with these variables:

blueprint_object1 - radius 15
blueprint_object2 - radius 20
blueprint_object3 - radius 8
blueprint_object4 - radius 6

and eventually i would like to have all these values stored into an array of a master blueprint’s array like:

0 - 15
1 - 20
2 - 8
3 - 6

Is there any proper way how to do this in UE4?

What I would do is:

  1. Use a “Get all actors of class”, this will give you an array of all the blueprint_objects.
  2. Make a “For each loop” of the array you obtained. Then, in the body of the loop, cast the item to your blueprint_object.
  3. You should now be able to get blueprint_object specific variables and do anything you need with them.


im trying to rebuild your schematic however for some reason i cant seem to create the “Target My Radius” node.
Aside from that, would you put this schematic in the “master” blueprint or in all the smaller configurable blueprints?

As for getting the My Radius: have you created a variable in your Blueprint_object that will contain the radius? As soon as you do so and compile the BPs, if you pick a node from the “As blueprint_object” you should be able to access any variables you previously created. In my example I created an actor blueprint named “BP Radius Thing”, created a float variable named MyRadius inside of it, and then proceeded to cast it from another BP (I actually made the sequence in the blueprint level editor, but it would have worked the same if I had created a whole new BP for that matter).

As for your second question, I don’t really know what you need these radiuses for, but I think I would have:

  1. A basic blueprint_object with the variables you need to obtain later on. Instances of this object would be spawned in the editor, and each instance would have its own variable values (e.g. one with radius = 15, another with radius = 20, and so on)
  2. A “master” blueprint that would call the above sequence and add it to the array.

So in essence you would be getting one BP (the “master” blueprint) that obtains data from many instances (the “blueprint_objects”).

im making a blueprint system that can “cull” circles in a ceiling so they can be filled with embedded details like halogen spots.
This allows for dynamic ceiling object placement without having to create custom booleans/geometry/masks for every custom layout of embedded details.

Ideally i would have like to use something like a trigger mesh to decide the cutout on the ceiling, especially for situations with complex shapes.
However i could not find a way to do this. Now i’m using multiple " SphereMasks" to create the round holes by using the holecutting blueprint’s world coordinates and the radius variable to specify how big the hole should be.

here is a screencap of how it looks in the scene:

the trigger volumes are currently just to display the holesize, they dont have a function besides that currently.
For my purposes this only has to work in the editor, i dont need any “at runtime” capability

Here is how the shader looks, it currently can accept 12 coordinates and radiuses for 12 holes, to add more possible holes i just have to duplicate the parts of the network and rename the attributes.

After i get this system working i will just make custom blueprints per light fixture that also include the model/lightentity/interactivity along with the hole cutting logic

Hmm to be honest that seems too material-specific and I’m not even sure if my above solution is appropiate.

If you need to know more in regards to bp interaction I would recommend having a look at blueprint interfaces and see if there is any way you can use then to your advantage.

Does anyone else have any ideas for the above scenario?

In “theory” it sounds very simple, just have a volume/mesh/particle that is flagged to cull whatever is inside of it, while using a black/whitelist to prevent other geometry from being culled.
getting this to work would have many practical uses aside from recessed lights doors or windows, think of special effects like holes being punched through walls, acid blood particles “eating” through a floor, bullet holes that create light holes through geometry, similar to (just the visual effect of) the lasercutter in wolfenstein 2014. or some kind of crazy railgun hitting/vaporising a player by culling from the place of impact.
Many things like this are already possible if they are prepared in advanced with custom textures in custom locations, however to have this as a procedural effect would be very usefull.
Would this be possible to write in code? (not that i would be able to)