Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created February 22, 2019 09:47
Show Gist options
  • Save theresajayne/29c7a7b220eb9e5fdda45bbc4ac10825 to your computer and use it in GitHub Desktop.
Save theresajayne/29c7a7b220eb9e5fdda45bbc4ac10825 to your computer and use it in GitHub Desktop.
// Sets default values
ASpawnVolume::ASpawnVolume()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
if (Role == ROLE_Authority)
{
WhereToSpawn = CreateDefaultSubobject<UBoxComponent>(TEXT("SpawnVolume"));
RootComponent = WhereToSpawn;
//Set some base values for range
SpawnDelayRangeLow = 1.0f;
SpawnDelayRangeHigh = 4.5f;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment