diff --git a/src/content/docs/reference/FPTagActorComponent.mdx b/src/content/docs/reference/FPTagActorComponent.mdx index dc350df..aa9d4e2 100644 --- a/src/content/docs/reference/FPTagActorComponent.mdx +++ b/src/content/docs/reference/FPTagActorComponent.mdx @@ -18,3 +18,4 @@ __Parent Classes:__ Helper Component to add Tags to Actor. +- Adds Tags to Actor on `InitializeComponent` diff --git a/src/content/docs/reference/FPTask_BlueprintBase.mdx b/src/content/docs/reference/FPTask_BlueprintBase.mdx index 3622868..fbc9a93 100644 --- a/src/content/docs/reference/FPTask_BlueprintBase.mdx +++ b/src/content/docs/reference/FPTask_BlueprintBase.mdx @@ -14,8 +14,8 @@ __FileName:__ `FPTask_BlueprintBase.h` -Blueprint Base Task -- Inherit from Blueprints to have custom BP Tasks. +Create Blueprint Tasks using this class as base. +- If Tick is not implemented, will instantly succeed on first tick. ### Functions @@ -26,17 +26,18 @@ Blueprint Base Task void ReceiveSetup(); ``` #### `ReceiveEnter` -> Implement enter Task +> Implement Enter Task ```cpp bool ReceiveEnter(); ``` #### `ReceiveTick` -> Implement tick Task +> Implement Tick from Blueprint \ +> !! FinishTask has to be called from ReceiveTick !! ```cpp -EFPTaskResult ReceiveTick(float DeltaTime); +void ReceiveTick(float DeltaTime); ``` #### `ReceiveExit` -> Implement exit Task +> Implement Exit from Blueprint ```cpp void ReceiveExit(EFPTaskResult TaskResult); ``` diff --git a/src/content/docs/reference/FPTask_Delay.mdx b/src/content/docs/reference/FPTask_Delay.mdx index acaa685..829b16c 100644 --- a/src/content/docs/reference/FPTask_Delay.mdx +++ b/src/content/docs/reference/FPTask_Delay.mdx @@ -17,11 +17,15 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Delays Execution +Simple task that adds a delay to the execution flow ### Properties ```cpp +// Delay Time +UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(ClampMin=0.0f, ForceUnits="s")) +float DelayTime = 0.0f; + // Adds random deviation (TimeAmount - RndDev, TimeAmount + RndDev), Clamped (0.0f - T) UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(ClampMin=0.0f, ForceUnits="s")) float RandomDeviation = 0.0f; diff --git a/src/content/docs/reference/FPTask_FlowAsset.mdx b/src/content/docs/reference/FPTask_FlowAsset.mdx deleted file mode 100644 index ae2ef5a..0000000 --- a/src/content/docs/reference/FPTask_FlowAsset.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: FPTask_FlowAsset.h -description: Reference page for FPTask_FlowAsset.h ---- - -## File Info - -__FileName:__ `FPTask_FlowAsset.h` -- __Class List:__ -[ [`UFPTask_FlowAsset`](#ufptask_flowasset) ] - - -## `UFPTask_FlowAsset` - - -__Parent Classes:__ -[ `UFlowPilotTask` ] - - -FPTask_FlowAsset -- Loads and Runs another FlowDataAsset diff --git a/src/content/docs/reference/FPTask_InsideVolume.mdx b/src/content/docs/reference/FPTask_InsideVolume.mdx new file mode 100644 index 0000000..0a4ecc4 --- /dev/null +++ b/src/content/docs/reference/FPTask_InsideVolume.mdx @@ -0,0 +1,78 @@ +--- +title: FPTask_InsideVolume.h +description: Reference page for FPTask_InsideVolume.h +--- + +## File Info + + +__FileName:__ `FPTask_InsideVolume.h` +- __Enum List:__ +[ [`EInsideVolumeFilterType`](#einsidevolumefiltertype) | [`EInsideVolumeComparisonOp`](#einsidevolumecomparisonop) ] +- __Class List:__ +[ [`UFPTask_InsideVolume`](#ufptask_insidevolume) ] + + +### `EInsideVolumeFilterType` + + +| Value | Description | +| :-- | :-- | +| `ByActor` | Filter Actors by Reference | +| `ByClass` | Filter Actors by Class | + + + +### `EInsideVolumeComparisonOp` + + +| Value | Description | +| :-- | :-- | +| `Equal` | Equal | +| `NotEqual` | NotEqual | +| `MoreThan` | MoreThan | +| `MoreThanOrEqual` | MoreThanOrEqual | +| `LessThan` | LessThan | +| `LessThanOrEqual` | LessThanOrEqual | + + + +## `UFPTask_InsideVolume` + + +__Parent Classes:__ +[ `UFlowPilotTask` ] + + +Inside Volume +- Specific "Trigger Volume" class that only checks if N Actors are inside a volume. +- Actors can be found by ActorReference or Class Type + +### Properties + +```cpp +// Trigger Volume Reference +UPROPERTY(EditAnywhere, Category="FlowPilot") +FFlowActorReference VolumeActorReference; + +// Actor Filter Type +UPROPERTY(EditAnywhere, Category="FlowPilot") +EInsideVolumeFilterType FilterActorType = EInsideVolumeFilterType::ByActor; + +// Actor Type Reference +UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="FilterActorType==EInsideVolumeFilterType::ByActor")) +FFlowActorReference ActorTypeReference; + +// Class Type Reference +UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="FilterActorType==EInsideVolumeFilterType::ByClass")) +TSoftClassPtr ClassType; + +// Comparison Operation for Actors Requires Inside Volume +UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="FilterActorType==EInsideVolumeFilterType::ByClass")) +EInsideVolumeComparisonOp ComparisonOperation = EInsideVolumeComparisonOp::Equal; + +// How many Actors required inside volume +UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="FilterActorType==EInsideVolumeFilterType::ByClass")) +int32 RequiredActorsCount = 1; + +``` diff --git a/src/content/docs/reference/FPTask_Loop.mdx b/src/content/docs/reference/FPTask_Loop.mdx index dd1fced..2f2b46a 100644 --- a/src/content/docs/reference/FPTask_Loop.mdx +++ b/src/content/docs/reference/FPTask_Loop.mdx @@ -17,4 +17,21 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Executes a Task in a Loop +Loops a Task's execution for X amount of times, or infinite + +### Properties + +```cpp +// Task to loop +UPROPERTY(EditDefaultsOnly, Instanced, Category = "FlowPilot") +TObjectPtr Task; + +// Will forever loop if True +UPROPERTY(EditDefaultsOnly, Category = "FlowPilot") +uint8 bIsInfinite : 1; + +// Number of times to repeat the same task +UPROPERTY(EditDefaultsOnly, Category = "FlowPilot", meta=(ClampMin=1, EditCondition="!bIsInfinite")) +int32 Loops = 3; + +``` diff --git a/src/content/docs/reference/FPTask_Parallel.mdx b/src/content/docs/reference/FPTask_Parallel.mdx index 62fef52..b618ceb 100644 --- a/src/content/docs/reference/FPTask_Parallel.mdx +++ b/src/content/docs/reference/FPTask_Parallel.mdx @@ -38,7 +38,8 @@ Parallel Task ### Properties ```cpp -// This defines what makes this Task succeed to continue flow. +// Desired Completion Type allows changing the Parallel Task Behavior +// See EFlowParallelCompletetionType enum UPROPERTY(EditDefaultsOnly, Category="FlowPilot") EFlowParallelCompletionType DesiredCompletionType = EFlowParallelCompletionType::AllSucceed; diff --git a/src/content/docs/reference/FPTask_PlayAnimation.mdx b/src/content/docs/reference/FPTask_PlayAnimation.mdx index b7ff74d..67854fa 100644 --- a/src/content/docs/reference/FPTask_PlayAnimation.mdx +++ b/src/content/docs/reference/FPTask_PlayAnimation.mdx @@ -19,26 +19,26 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Play Animation -- Can Play an animation on many Pawns -- Can wait for animations to finish to continue +Task that plays an animation +- Will play the animation to one or multiple Pawns found via FlowActorReference +- Option to wait for animations to complete before succeeding ### Properties ```cpp -// Actors this animation asset will be played on +// Pawns to play animations on UPROPERTY(EditAnywhere, Category="FlowPilot") FFlowActorReference ActorsToPlayAnimationOn; -// Animation Asset to use +// Animation Asset to play UPROPERTY(EditAnywhere, Category="FlowPilot") TSoftObjectPtr AnimationAsset; -// Loop animation if true +// if true, will loop animations UPROPERTY(EditAnywhere, Category="FlowPilot") uint8 bLooping : 1; -// Waits for animation to complete to continue execution +// if true, will wait for animation to finish before succeeding task UPROPERTY(EditAnywhere, Category="FlowPilot") uint8 bWaitForAnimationEnd : 1; diff --git a/src/content/docs/reference/FPTask_PlaySound.mdx b/src/content/docs/reference/FPTask_PlaySound.mdx index 8485478..b394aa7 100644 --- a/src/content/docs/reference/FPTask_PlaySound.mdx +++ b/src/content/docs/reference/FPTask_PlaySound.mdx @@ -22,15 +22,15 @@ Plays SoundCues or SoundWaves ### Properties ```cpp -// Where to play sound from. +// Actor Reference to use as source location UPROPERTY(EditAnywhere, Category = "FlowPilot") FFlowActorReference ActorReference; -// SoundCue to Play +// Sound Cue to play UPROPERTY(EditAnywhere, Category="FlowPilot") TObjectPtr SoundToPlay; -// SoundWave to Play +// Sound Wave to play UPROPERTY(EditAnywhere, Category="FlowPilot") TObjectPtr SoundWaveToPlay; diff --git a/src/content/docs/reference/FPTask_PlaySound2D.mdx b/src/content/docs/reference/FPTask_PlaySound2D.mdx index d8eb38b..48758c2 100644 --- a/src/content/docs/reference/FPTask_PlaySound2D.mdx +++ b/src/content/docs/reference/FPTask_PlaySound2D.mdx @@ -22,15 +22,15 @@ Play 2D Sounds ### Properties ```cpp -// SoundCue to play +// Sound Cue to Play UPROPERTY(EditAnywhere, Category="FlowPilot") TObjectPtr SoundToPlay; -// SoundWave to play +// Sound Wave to Play UPROPERTY(EditAnywhere, Category="FlowPilot") TObjectPtr SoundWaveToPlay; -// Is UI Sound +// if true, will play as UI sound UPROPERTY(EditAnywhere, Category="FlowPilot") uint8 bIsUISound : 1; @@ -42,19 +42,19 @@ float VolumeMultiplier = 1.0f; UPROPERTY(EditAnywhere, Category="FlowPilot", AdvancedDisplay) float PitchMultiplier = 1.0f; -// Play Start time +// Play Start Time UPROPERTY(EditAnywhere, Category="FlowPilot", AdvancedDisplay) float StartTime = 0.0f; -// Concurrency Settings +// Sound Concurrency Settings UPROPERTY(EditAnywhere, Category="FlowPilot", AdvancedDisplay) USoundConcurrency* ConcurrencySettings = nullptr; -// If the Sound persists across level changes +// if True, sound will persist across level changes UPROPERTY(EditAnywhere, Category="FlowPilot", AdvancedDisplay) bool bPersistAcrossLevels = false; -// Automatically destroy sound when finished playing +// if true, sound actor will auto destroy once finished playing UPROPERTY(EditAnywhere, Category="FlowPilot", AdvancedDisplay) bool bAutoDestroy = true; diff --git a/src/content/docs/reference/FPTask_PossessPawn.mdx b/src/content/docs/reference/FPTask_PossessPawn.mdx index e2fc3a0..59e4a5e 100644 --- a/src/content/docs/reference/FPTask_PossessPawn.mdx +++ b/src/content/docs/reference/FPTask_PossessPawn.mdx @@ -17,29 +17,22 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Posses Pawn: +Possess Pawn - Spawns a Controller and Possesses a Pawn -- Can Possess multiple Pawns at the same time using a shared GameplayTag 🏷️ +- Can Possess multiple Pawns at the same time ### Properties ```cpp // Pawns to Possess -// if possessed by Player, will only search for 1 Pawn. -// if possessed by AI Controller, will search for multiple Pawns. UPROPERTY(EditAnywhere, Category="FlowPilot") FFlowActorReference PawnsToPossess; -// If true, the Player will posses the Pawn +// Player Possesses only 1 Pawn UPROPERTY(EditAnywhere, Category="FlowPilot") bool bPossessByPlayer = false; -// Player Controller Index, in single player games this is usually 0. -// for more complex cases, this could be parameterized -UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="bPossessByPlayer", EditConditionHides)) -int32 PlayerIndex = 0; - -// AI Controller class to posses Pawn with +// AI Controller Class to Posses Pawns with. UPROPERTY(EditAnywhere, Category="FlowPilot", meta=(EditCondition="!bPossessByPlayer", EditConditionHides)) TSubclassOf ControllerClass; diff --git a/src/content/docs/reference/FPTask_Selector.mdx b/src/content/docs/reference/FPTask_Selector.mdx index c40bec7..faad5b7 100644 --- a/src/content/docs/reference/FPTask_Selector.mdx +++ b/src/content/docs/reference/FPTask_Selector.mdx @@ -14,7 +14,7 @@ __FileName:__ `FPTask_Selector.h` __Parent Classes:__ -[ `UFPTaskRunner` ] +[ `UFPTask_Sequence` ] Selector Task diff --git a/src/content/docs/reference/FPTask_Sequence.mdx b/src/content/docs/reference/FPTask_Sequence.mdx index f8749f9..f4b209c 100644 --- a/src/content/docs/reference/FPTask_Sequence.mdx +++ b/src/content/docs/reference/FPTask_Sequence.mdx @@ -14,7 +14,7 @@ __FileName:__ `FPTask_Sequence.h` __Parent Classes:__ -[ `UFPTaskRunner` ] +[ `UFlowPilotParent` ] Sequence Task diff --git a/src/content/docs/reference/FPTask_SpawnClass.mdx b/src/content/docs/reference/FPTask_SpawnClass.mdx index 70b0f26..d79c7b0 100644 --- a/src/content/docs/reference/FPTask_SpawnClass.mdx +++ b/src/content/docs/reference/FPTask_SpawnClass.mdx @@ -6,10 +6,22 @@ description: Reference page for FPTask_SpawnClass.h ## File Info __FileName:__ `FPTask_SpawnClass.h` +- __Enum List:__ +[ [`EFPSpawnLocationType`](#efpspawnlocationtype) ] - __Class List:__ [ [`UFPTask_SpawnClass`](#ufptask_spawnclass) ] +### `EFPSpawnLocationType` + + +| Value | Description | +| :-- | :-- | +| `Reference` | Provide a reference actor for the spawn position | +| `World` | Provide World Coordinates for specific position | + + + ## `UFPTask_SpawnClass` @@ -17,12 +29,14 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Spawns a Class +Generic Spawn Class Task +- Can spawn at a world position, or based on an actor +- Option to select Persistent Lifetime or FlowPilot lifetime ### Properties ```cpp -// Spawn Lifetime dictates when we Destroy this Actor or leave it alive forever +// SpawnLifetime dictates when we Destroy this Actor, (or leave it alive forever) UPROPERTY(EditAnywhere, Category = "FlowPilot") EFlowActorSpawnLifetime ActorSpawnLifetime = EFlowActorSpawnLifetime::Persistent; @@ -30,14 +44,26 @@ EFlowActorSpawnLifetime ActorSpawnLifetime = EFlowActorSpawnLifetime::Persistent UPROPERTY(EditAnywhere, Category = "FlowPilot") TObjectPtr SpawnClass; -// Spawn Location Reference +// 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 -UPROPERTY(EditAnywhere, Category = "FlowPilot") +// 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; diff --git a/src/content/docs/reference/FPTask_SubFlow.mdx b/src/content/docs/reference/FPTask_SubFlow.mdx new file mode 100644 index 0000000..a76c895 --- /dev/null +++ b/src/content/docs/reference/FPTask_SubFlow.mdx @@ -0,0 +1,22 @@ +--- +title: FPTask_SubFlow.h +description: Reference page for FPTask_SubFlow.h +--- + +## File Info + + +__FileName:__ `FPTask_SubFlow.h` +- __Class List:__ +[ [`UFPTask_SubFlow`](#ufptask_subflow) ] + + +## `UFPTask_SubFlow` + + +__Parent Classes:__ +[ `UFlowPilotTask` ] + + +FPTask_SubFlow +- Loads and Runs another FlowPilot Asset diff --git a/src/content/docs/reference/FPTask_TriggerDistance.mdx b/src/content/docs/reference/FPTask_TriggerDistance.mdx index a5455f1..43ec265 100644 --- a/src/content/docs/reference/FPTask_TriggerDistance.mdx +++ b/src/content/docs/reference/FPTask_TriggerDistance.mdx @@ -7,12 +7,12 @@ description: Reference page for FPTask_TriggerDistance.h __FileName:__ `FPTask_TriggerDistance.h` - __Enum List:__ -[ [`ETriggerDistanceOp`](#etriggerdistanceop) | [`EDistanceMethod`](#edistancemethod) ] +[ [`EDistanceComparisonOp`](#edistancecomparisonop) | [`EDistanceMethod`](#edistancemethod) ] - __Class List:__ [ [`UFPTask_TriggerDistance`](#ufptask_triggerdistance) ] -### `ETriggerDistanceOp` +### `EDistanceComparisonOp` | Value | Description | @@ -42,19 +42,21 @@ __Parent Classes:__ Trigger by Distance +- Checks distances from Source Actor Reference and Destination Actor Reference +- Will use Squared Distances internally. ### Properties ```cpp -// First Actor Tag +// Source Actor to check Distance From UPROPERTY(EditAnywhere, Category = "FlowPilot") -FFlowActorReference FirstActorReference; +FFlowActorReference SourceActorReference; -// Distance Operation +// Distance Comparison Operation UPROPERTY(EditAnywhere, Category = "FlowPilot") -ETriggerDistanceOp Operation = ETriggerDistanceOp::LessThan; +EDistanceComparisonOp Operation = EDistanceComparisonOp::LessThan; -// Distance Method +// Distance method to use. UPROPERTY(EditAnywhere, Category = "FlowPilot") EDistanceMethod Method = EDistanceMethod::Distance3D; @@ -62,8 +64,8 @@ EDistanceMethod Method = EDistanceMethod::Distance3D; UPROPERTY(EditAnywhere, Category = "FlowPilot", meta=(ClampMin=0.0f)) float ThresholdDistance; -// Second Actor Tag +// Destination Actor to check Distance From UPROPERTY(EditAnywhere, Category = "FlowPilot") -FFlowActorReference SecondActorReference; +FFlowActorReference DestinationActorReference; ``` diff --git a/src/content/docs/reference/FPTask_TriggerVolume.mdx b/src/content/docs/reference/FPTask_TriggerVolume.mdx index eccbe51..c6fedf4 100644 --- a/src/content/docs/reference/FPTask_TriggerVolume.mdx +++ b/src/content/docs/reference/FPTask_TriggerVolume.mdx @@ -17,8 +17,8 @@ __FileName:__ `FPTask_TriggerVolume.h` | Value | Description | | :-- | :-- | -| `OnEnter` | Triggers when Entering Volume | -| `OnExit` | Triggers when Exiting Volume | +| `OnEnter` | OnEnter | +| `OnExit` | OnExit | @@ -29,18 +29,16 @@ __Parent Classes:__ [ `UFlowPilotTask` ] -Trigger by Volume Task -- Allows choosing to Trigger (succeed task) on Entry or Exit of a volume -- Allows to wait on multiple Pawns +Trigger by Volume ### Properties ```cpp -// Trigger Event to Listen to +// Trigger to Listen to UPROPERTY(EditAnywhere, Category = "FlowPilot") ETriggerVolumeEvent TriggerEvent; -// Volume Reference Actor. Should be single actor +// Volume Reference Actor UPROPERTY(EditAnywhere, Category = "FlowPilot") FFlowActorReference VolumeReference; diff --git a/src/content/docs/reference/FlowPilot.mdx b/src/content/docs/reference/FlowPilot.mdx index cc14bca..a78e2d1 100644 --- a/src/content/docs/reference/FlowPilot.mdx +++ b/src/content/docs/reference/FlowPilot.mdx @@ -17,7 +17,12 @@ __Parent Classes:__ [ `UDataAsset` ] -FlowPilot Data +FlowPilot Data Asset +- Defines FlowName +- Defines Root Sequence +By default, all FlowPilot Assets are Sequences which is a good enough point to start your flow. +if the need arises, we can potentially add an option to switch to a selector by default +for now, if you want a selector first, you can add it as the first child of the sequence, that will work just as well. ### Properties @@ -31,16 +36,3 @@ UPROPERTY(meta=(DeprecatedProperty)) TArray> MainFlow_DEPRECATED; ``` - -### Functions - -#### `PostLoad` -> UObject -```cpp -virtual void PostLoad() override; -``` -#### `PostRename` -> ~UObject -```cpp -virtual void PostRename(UObject* OldOuter, const FName OldName) override; -``` diff --git a/src/content/docs/reference/FlowPilotComponent.mdx b/src/content/docs/reference/FlowPilotComponent.mdx index 058809a..d4c0b0a 100644 --- a/src/content/docs/reference/FlowPilotComponent.mdx +++ b/src/content/docs/reference/FlowPilotComponent.mdx @@ -17,12 +17,31 @@ __Parent Classes:__ [ `UActorComponent` ] -FlowComponent -- Initializes, Maintains and Runs a Flow Data Asset. +FlowPilotComponent initializes, maintains and runs a FlowPilot Data Asset. ### Properties ```cpp +// Delegate that indicates a FlowState Chane (OldFlowState, NewFlowState) +UPROPERTY(BlueprintAssignable, Category="FlowPilot") +FFlowStateChangedSignature OnFlowStateChanged; + +// Delegate indicating Flow Started +UPROPERTY(BlueprintAssignable, Category="FlowPilot") +FFlowStartedSignature OnFlowStarted; + +// Delegate indicating Flow Paused +UPROPERTY(BlueprintAssignable, Category="FlowPilot") +FFlowPausedSignature OnFlowPaused; + +// Delegate indicating Flow Error +UPROPERTY(BlueprintAssignable, Category="FlowPilot") +FFlowErrorSignature OnFlowError; + +// Delegate indicating Flow Completed +UPROPERTY(BlueprintAssignable, Category="FlowPilot") +FFlowCompletedSignature OnFlowCompleted; + // Automatically starts FlowPilot on BeginPlay UPROPERTY(EditAnywhere, Category=FlowPilot) uint8 bAutoStartOnBeginPlay : 1; @@ -52,7 +71,7 @@ TArray> FlowPilotLifetimeActors; bool SetFlowPilotAsset(UFlowPilot* InFlowPilotAsset); ``` #### `StartFlow` -> Start Current FlowData +> Start Current FlowPilot ```cpp void StartFlow(); ``` @@ -77,27 +96,28 @@ void UnPauseFlow(); bool IsPaused() const { return FlowState == EFlowState::Paused; } ``` #### `IsDataSetup` -> Returns true is setup is valid +> Returns true if FlowPilotComponent has a FlowPilotAsset assigned. ```cpp bool IsDataSetup() const { return FlowPilotAsset != nullptr; } ``` #### `GetRunState` -> Returns FlowPilot state +> Returns FlowPilot Run State ```cpp EFlowState GetRunState() const { return FlowState; } ``` #### `IsRunning` -> Returns true if FlowPilot is in Progress +> Returns true if FlowPilot's run state is in Progress ```cpp bool IsRunning() const { return FlowState == EFlowState::InProgress; } ``` #### `FindSingleActor` -> Finds single actor reference +> Find a single actor from a FlowActorReference. \ +> If there are multiple assigned to this reference, a warning will show up, and the first result returned ```cpp AActor* FindSingleActor(const FFlowActorReference& ActorReference); ``` #### `FindActors` -> Finds all actors with reference (usually external tags on multiple actors) +> Finds all actors from a FlowActorReference ```cpp TArray FindActors(const FFlowActorReference& ActorReference); ``` @@ -107,17 +127,28 @@ TArray FindActors(const FFlowActorReference& ActorReference); AActor* FindSingleActorByTag(const FGameplayTag& Tag); ``` #### `FindActorsByTag` -> Find All Actors by Tag +> Find and Caches all Actors by Tag ```cpp TArray FindActorsByTag(const FGameplayTag& Tag); ``` #### `BindToFlowPilotLifetime` -> Binds Lifetime of Actor to FlowPilot. Will destroy when FlowPilot Completes +> Binds Lifetime of Actor to FlowPilot. \ +> 'InActor' will automatically be destroyed when FlowPilot execution ends. ```cpp void BindToFlowPilotLifetime(AActor* InActor); ``` #### `PrefetchActorReference` -> Will prefect Actor Reference if Referenced via External Tag. +> Adds 'ActorReference' to list of actors that will be prefetched on 'Setup ```cpp void PrefetchActorReference(const FFlowActorReference& ActorReference); ``` +#### `CacheTaggedActor` +> Caches 'InActor' with its associated unique tag 'InGameplayTag' +```cpp +void CacheTaggedActor(AActor* InActor, const FGameplayTag& InGameplayTag); +``` +#### `GetFlowPilotName` +> Returns FlowPilot Data assets's name. +```cpp +FString GetFlowPilotName() const; +``` diff --git a/src/content/docs/reference/FlowPilotSettings.mdx b/src/content/docs/reference/FlowPilotSettings.mdx index e8b9faa..6f987ce 100644 --- a/src/content/docs/reference/FlowPilotSettings.mdx +++ b/src/content/docs/reference/FlowPilotSettings.mdx @@ -22,25 +22,30 @@ FlowPilot Project User Settings. ### Properties ```cpp -// Will prefetch Actors on Setup +// Allows changing the default ticking group for Ticking FlowPilotComponents. +// Components tick 'DuringPhysics' by default. +UPROPERTY(EditAnywhere, Config, Category="Performance") +TEnumAsByte DefaultTickingGroup = ETickingGroup::TG_DuringPhysics; + +// Will prefetch Actors on FlowPilot Setup Phase UPROPERTY(EditAnywhere, Config, Category="Caching") -uint8 bPrefetchActorsOnSetup : 1; +bool bPrefetchActorsOnSetup = true; -// Only show Description On Active Tasks +// Show Runtime Descriptions On Active Tasks Only UPROPERTY(EditAnywhere, Config, Category="Debug") -uint8 bShowDescriptionOnActiveTasks : 1; +bool bShowDescriptionOnActiveTasks = true; -// Will display future Tasks only when the Parent Task is Active. +// Will display future Child Tasks only when the Parent Task is Active. UPROPERTY(EditAnywhere, Config, Category="Debug") -uint8 bShowFutureChildTasksWhenParentActive : 1; +bool bShowFutureChildTasksWhenParentActive = true; -// Show X Queued Tasks +// Number of Queued Tasks to Show UPROPERTY(EditAnywhere, Config, Category="Debug", meta=(ClampMin=0)) -int32 ShowQueuedTasksCount = 3; +int32 ShowQueuedTasksCount = 4; -// Show X Completed Tasks +// Number of Completed Tasks to Show UPROPERTY(EditAnywhere, Config, Category="Debug", meta=(ClampMin=0)) -int ShowCompletedTasksCount = 3; +int ShowCompletedTasksCount = 2; // Scale Debug UI UPROPERTY(EditAnywhere, Config, Category="Debug", meta=(UIMin=0.5f, UIMax=2.0f)) @@ -48,19 +53,19 @@ float DebugFontScale = 1.0f; // If True, Draws Root Node UPROPERTY(EditAnywhere, Config, Category="Debug") -uint8 bDrawRoot : 1; +bool bDrawRoot = false; // Hierarchy Indentation UPROPERTY(EditAnywhere, Category="Debug|Display Preferences") -float Indentation = 5.0f; +float Indentation = 4.0f; // Text padding UPROPERTY(EditAnywhere, Category="Debug|Display Preferences") -FVector2D TextPadding = FVector2D(10.0f, 5.0f); +FVector2D TextPadding = FVector2D(8.0f, 3.5f); // Tile with background Margin UPROPERTY(EditAnywhere, Category="Debug|Display Preferences") -float TileVerticalMargin = 2.0f; +float TileVerticalMargin = 1.75f; // Running Task Color UPROPERTY(EditAnywhere, Category="Debug|Display Preferences") diff --git a/src/content/docs/reference/FlowPilotTask.mdx b/src/content/docs/reference/FlowPilotTask.mdx index 84eb052..a6a437d 100644 --- a/src/content/docs/reference/FlowPilotTask.mdx +++ b/src/content/docs/reference/FlowPilotTask.mdx @@ -56,6 +56,12 @@ virtual void Exit(EFPTaskResult TaskResult); ```cpp virtual void Reset(); ``` +#### `FinishTask` +> Method to call to finish a task. \ +> This method will set EFPTaskResul to Success or Fail on next Tick. +```cpp +void FinishTask(bool bSuccess); +``` #### `IsEnabled` > Disabled Tasks are skipped during execution ```cpp @@ -103,7 +109,7 @@ void SetParent(UFlowPilotTask* InParent) { Parent = InParent; } bool IsParent() const; ``` #### `GetAsParent` -> Returns this Cast to FlowPilotParent task. +> Returns this object Cast to FlowPilotParent task. ```cpp UFlowPilotParent* GetAsParent(); ```