My current structure of the game is base classes all in c++ with blueprints created from the base classes. So perhaps a single c++ base class and 50 blueprint actors based off that.
But what I want to do is a dynamic spawn system, so no actors will exist start of the game except for the player himself. So on map load, only a single pawn is loaded (player), and then dynamically all actors are spawned based off whatever parameters I decided upon.
But what would you guys recommend on the design choice. A custom spawn class that I can reference via the player controller or game instance or the pawn himself?
For example things id like to be able to do
- spawn in actor (by blueprint name?) directly in front of my currently controlled pawn with a keypress.
- spawn in a random actor from all possible actors that exist (should I use LoadBlueprintsFromPaths() ???) How do I get all available actors in my game that my custom spawn class can use
- spawn in a random actor or passed in blueprint name from a blueprint widget (game menu)
- spawn in random or passed in blueprint name actors on level load.
So I’m curious how you guys would go about this.