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
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?
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):
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.
Thank you so much for taking your time and writing this.
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.
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.