Skip to content

FPTask_SpawnClass.h

File Info

FileName: FPTask_SpawnClass.h

EFPSpawnLocationType

ValueDescription
ReferenceProvide a reference actor for the spawn position
WorldProvide World Coordinates for specific position

UFPTask_SpawnClass

Parent Classes: [ UFlowPilotTask ]

Generic Spawn Class Task

  • Can spawn at a world position, or based on an actor
  • Option to select Persistent Lifetime or FlowPilot lifetime

Properties

// SpawnLifetime dictates when we Destroy this Actor, (or leave it alive forever)
UPROPERTY(EditAnywhere, Category = "FlowPilot")
EFPSpawnLifetime ActorSpawnLifetime = EFPSpawnLifetime::Persistent;
// UClass to Spawn
UPROPERTY(EditAnywhere, Category = "FlowPilot")
TObjectPtr<UClass> SpawnClass;
// Location Type determines World Position, or Relative to an actor
UPROPERTY(EditAnywhere, Category = "FlowPilot")
EFPSpawnLocationType LocationType = EFPSpawnLocationType::Reference;
// Spawn Location Reference
UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(EditCondition="LocationType==EFPSpawnLocationType::Reference", EditConditionHides))
FFlowActorReference SpawnLocationReference;
// Spawn Offset added to SpawnLocationReference
UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(EditCondition="LocationType==EFPSpawnLocationType::Reference", EditConditionHides))
FVector SpawnOffset = FVector::ZeroVector;
// Spawn World Location
UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(EditCondition="LocationType==EFPSpawnLocationType::World", EditConditionHides))
FVector SpawnWorldLocation = FVector::ZeroVector;
// Spawn World Rotation
UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(EditCondition="LocationType==EFPSpawnLocationType::World", EditConditionHides))
FRotator SpawnWorldRotation = FQuat::Identity.Rotator();
// GameplayTags to add Spawned Actor
UPROPERTY(EditAnywhere, Category = "FlowPilot")
FGameplayTagContainer TagsToAddActor;
// Spawn Collision Method
UPROPERTY(EditAnywhere, Category = "FlowPilot")
ESpawnActorCollisionHandlingMethod SpawnCollisionMethods = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;