Spawn Marker Specification - wwestlake/Steamforge GitHub Wiki
The Spawn Marker is an editor-visible, runtime-invisible actor used to designate dynamic spawn locations for in-game objects such as collectible rocks, NPCs, or other actors. These markers are designed to be placed manually in the level and managed by the ObjectManagementSystem
, a Game Instance Subsystem responsible for runtime instantiation and lifecycle management.
- Reduce manual placement of multiple actors
- Provide a centralized, scalable method to spawn and respawn items
- Allow designers to configure spawn behavior using instance parameters
-
Billboard Component: Provides a visual icon in the editor for easy location and manipulation
- Visible only in the editor
- Uses a spawn icon or custom texture for identification
Variable | Type | Description |
---|---|---|
SpawnClass |
TSubclassOf<AActor> |
Class to spawn (e.g., rock, item, NPC) |
SpawnRadius |
float |
Radius around the marker in which objects may be spawned |
SpawnCount |
int |
Number of objects to maintain in the spawn area |
RespawnDelay |
float |
Time in seconds to wait before respawning a despawned item |
bRespawn |
bool |
Whether objects should be respawned after destruction or collection |
InitialSpawnDelay |
float |
Optional delay before the first spawn event |
GroupTag |
FName |
Optional tag for grouping markers |
-
Actor Hidden In Game
set to true - Collision disabled
- Optional debug visuals can be added using
EditorConstructionScript
During initialization or at relevant runtime intervals, the ObjectManagementSystem
will:
- Query all actors of type
AGameSpawnerMarker
- Extract configuration data
- Spawn the specified number of actors of
SpawnClass
withinSpawnRadius
- Monitor spawned instances for lifecycle events (destruction, collection)
- Trigger respawn after
RespawnDelay
ifbRespawn
is true
TArray<AActor*> SpawnerMarkers;
UGameplayStatics::GetAllActorsOfClass(GetWorld(), AGameSpawnerMarker::StaticClass(), SpawnerMarkers);
for (AActor* Marker : SpawnerMarkers) {
AGameSpawnerMarker* Spawner = Cast<AGameSpawnerMarker>(Marker);
if (Spawner) {
// Handle spawning logic here
}
}
- Support for weighted spawn tables
- Integration with region-based streaming or spawn culling
- UI indicators in editor for better visualization of spawn radius
- Optional blueprint interface for per-spawn customization
Author: Steamforge Systems Team
Last Updated: April 8, 2025