How do i randomly spawn platforms and then randomly spawn objects on those platforms?

I have been trying to find how to do this for at least two months and i must admit defeat, ask for help and hope that a guardian angel (or a devil, i really do not care at this point) help me solve this problem. Basically i am trying to spawn several platforms and on top of those platforms to again randomly spawn like 1-7 objects and be all aligned the same height from the platforms. Also all the platform are on the same Z coordinate (different from the objects. I would like to be able to spawn like 20 or so platforms not to far from each other.

You could create a “Platform” blueprint actor, making sure that you take into special account the length of those Platforms if you need to make sure that they spawn perfectly next to eachother (you would use these length values to offset the spawn position of the platforms if they are of differing sizes).

In the platform blueprint you could define “spawnpoints” for your random objects, as you spawn each platform you spawn the objects for that platform then move onto spawning the next platform etc etc.

If you need a visual example let me know and i could hash one out for you.

Please do, that would be great. The engine is great but i still feel like a cinderblock when it comes to blueprints. I only managed to make emissive materials. Hre is what ive done so far hope it looks ok.

I hope you get this message. I initially responded on my own question. Im still figuring out how this website works.

To begin with i create a Spawner Actor, this actor will actuually spawn our platforms for us.

Then i create a Platform Actor, this actor will be spawned in by the Spawner but will also spawn your other actors, but only across its surface. It is just a simple cube mesh scaled up a little.

The Spawner is spawning 100 Platforms and each platform is spawning a random number of other actors, i just used actors from the Starter Content as an example.

Here is the results.

You can easily change the spacing by manipulating the values on the Transform portion of the Spawner where you multiply by the Platforms dimensions in the first image.

I hope this is sufficient to help you :slight_smile:

thank you, this will help greatly. i did have another question that i posted at this link, if you could hel that would be great.