Generating actor with components in Construction Script

Hello!

So, I’m working on some system for procedural generated environment. It uses HISM component and whole process is done in construction script.

I have a problem with variations of algorithms I want to use in this system, and how to organize it.

For example, some actor generates 2D grid of objects in space, so it makes all calculations for objects transforms. I want to add additional randomized transforms for every object/instance in this grid. I know that I can add some Min/Max variables and functions to calculate additional location/rotation/scale to this 2D grid actor.

But I want to share this variables and functions between various actors, which can generate 1D or 3D grid, circular placement or whatever.

I can’t use inheritance here, because its very difficult to understand usage variations.

I already have Blueprint Function Library that contains simple functions like random vector in range and so on, but its also difficult to use Function Library for some randomization purposes, because they usually need many additional variables.

I tried to use actor components and it would be very useful to “construct” this kind of actors with such components. For example, 2d grid actor have “randomization transform component” which already have bunch of Min/Max variables and functions, so I can edit them in level and use in actor. But it looks like component variables can’t be passed to actor’s construction script, they always have default values…

And it looks like everything I can do is duplicate this variables and functionality in every actor.

Maybe you can advice?

Thanks!

Resolved using inheritance.