Download

What's your best practice for placing respawning enemies on a saveable map?

In Himeko Sutori, I would spawn all of the enemies in Kismet as the player moves through the world map. And when the player changes maps, I have to destroy all of the enemy pawns and their controllers. I’m working on a sequel/expansion and I’m wondering now if there’s a better way to do it.

This expansion is going to have maps where certain enemies or groups of enemies can spawn around certain spawn points. If the player defeats the enemies, they’ll respawn after some amount of time. I’m sure some of your games implement something similar. How did you do it?

Right now I’m considering placing some PlayerStart actors around the level, setting up Kismet to spawn enemies when the player first enters the level, and saving those enemies with the Kismet save game gem. Is that more or less how you did it? Is there a better way?

I place my own custom placeable actors (which I call spawn points, but just extend from Actor). They each spawn managers which individually handle AI/loot/etc spawns in proximity to the owning spawn point.

Whenever an AI is killed/expires/etc, it reports back to it’s spawn point manager, and the manager will handle respawning/spawn-cooldowns/tracking stats and state/etc.

This keeps things easily manageable across a large map with many different regions.

The main placeable actor which spawns the managers can also store info on the types and numbers of AI/loot/etc, which it can then initialize the managers with. This allows you to configure the different areas with the appropriate spawn types within the editor.

1 Like

Me like cold scooter, I make actor called spawner in the arena the rest coldscooter explains it.