Create random galaxies?

If you create a Master Galaxy Actor with a set of variables which you want to change to differentiate the galaxies from each other, eg size, distance to next planet, color, population etc. Make them editable and exposed on spawn.

Then, in a WorldActor you can spawn childs of the Master Galaxy Actor with different types of star values for the above stated variables.

It will take some time to set up the master galaxy and choose what type of variables should differentiate them, but it’s for sure possible in BP

Okay, thanks for the fast answer! I´m not so experienced with blueprints so I´ll have to look what all of these things mean :slight_smile: But thanks anyway!

Cool!
Feel free to ask if it’s something you don’t understand about the above.

Hi guys, so I´ve been thinking about creating an rts space game. Now I thought if it would be possible to create random galaxies with planets and their own stats and so on fully in BP. You think it would be possible?

Well what about the “Master” galaxy Actor? how can I set something like that up, I how could I start it? by creating a bunch of varables? What is a Master blueprint? :slight_smile:

Master is just a saying that all the other blueprints is copies of that Actor.

For example Ice Creams. Then Ice Cream is the Master Ice Cream, and then all other flavors, eg Chocolate Ice Cream, Strawberry Ice Cream, are childs to Ice Cream.

To continue the Ice Cream metaphor we can use it for how you can set up a system of random ice creams which you then can apply to galaxies or planets.

So we decide that all Ice Creams should have the following attributes (variable type in parenthesis):

  • Flavor (String)
  • Size (Float)
  • Container (String)

Then we create a Blueprint Actor called Ice Cream and inside that create the 3 above variables (editable, exposed on spawn)

Now we want to create our Chocolate, 20 uu (unreal units), Cone Ice Cream. Then we create a Child Blueprint Actor of Ice Cream and call it Chocolate Ice Cream for example. Inside the Chocolate Ice Cream we then access the Flavor, Size, Container variables (because it’s a child of Ice Cream) and set them to:

  • Flavor = Chocolate
  • Size = 20
  • Container = Cone

or if you like Strawberry…

  • Flavor = Strawberry
  • Size = 15
  • Container = Cup

You can now create whatever Ice Cream you want by choice or random, the concept will work on both. And if you extend the master with, say a Topping variable, then every Ice Cream Flavor will be able to set a Topping Variable as well.

In the same fashion you can create your own Master Galaxy Actor with attributes of choice, and create unlimited versions of Galaxies based on those.

Hope it helps!

Thank you so much for taking your time and writing this. :slight_smile:

Ok so I´ve undersood this parent and child blueprint thingy, now I have 2 different ice cream types. I want to spawn them in the world so they will print all those parameters. But how can I spawn all these childs at once?

So, I’ve created this new Actor we can call it “IceCreamSpawner” which is placed somewhere in the world. Inside that Actor I create the BP nodes in the picture. Spawn Actor of Class → Choose the Master Ice Cream → Input the variables values of choice.

This will spawn a Ice Cream each time the Spawn Actor of Class is called. Then based on the variabel input you can make stuff like change color etc. see pic 2.

Okay, but why do i need child blueprints if i can change everything in the “IcecreamSpawner” blueprint?

And also I don´t see how you suddenly created two different kinds of colors in that blueprint? :slight_smile:

When you spawn from BP it creates a child blueprint automatically, but if you want to create the different types of Ice Creams manually and place them in the world by hand then you can create Child Blueprints from the content browser.

So as you say, you don’t need to create child blueprints manually if you don’t want to, but it can comes in handy in some cases.

That’s done inside the Master Ice Cream based on the Flavor String. Look around the forum for “change material parameters from blueprint” and you will find how :slight_smile:

I just did it to make a visual differences between them :slight_smile:

ooh thanks :smiley: