Blueprints: Deriving objects as classes for data and then using them in other blueprints

Hey Scarlet,

I just did something very similar (it’s not space stations but different tile types in a tilebased project) and I can feel the pain lol - took me a while to translate Blueprint to the OO languages I’m used to in my head.

When you create a blueprint, you can select what kind of blueprint it will be, one option is Actor. So I suggest your baseStation Blueprint should be of that type so you got something visible to spawn.

In your baseStation, you define all variables all stations have in common like Name, Model etc. then you can create more Blueprint Classes for each Station Type and let them inherit that BaseStation Class. You can then define specific variables in each of those derived classes.

Here’s an example of how I’m using my BaseClass to spawn specific Childs (you got to translate that to your SpaceStations but it should give a general idea):

The screenshot basically shows a Tile Factory, where I enter the (specific) TileType and the target X/Y coordinate in my grid.

Here’s another example, this is the initial world generation:

Basically, GetFittingTileForCoordinate checks if it is a coordinate at the edge of the map (or in the corners) and returns a straight or corner wall tile type or an empty floor tile otherwise. That type can then be passed into the spawn function.

And here’s an example output:

Note that each wall type (each corner, horizontal straight, vertical straight and empty floor) are different “child” tile classes and all of them are derived from my BaseTile class.

Hope this helps to get you on the right track.

1 Like