Space Plunder
Loading...
Searching...
No Matches
BTTask_GetNextPatrolPoint.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "BehaviorTree/BTTaskNode.h"
7#include "BTTask_GetNextPatrolPoint.generated.h"
8
12UCLASS()
13class AITOOLKIT_API UBTTask_GetNextPatrolPoint : public UBTTaskNode
14{
15 GENERATED_BODY()
16
17
18public:
20
21 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
22 bool bMoveToBridge = false;
23 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
24 int32 GetPointAttempts = 4;
25 //- Override the Radius of the Patrol Point //
26 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
27 bool bOverrideRadius = false;
28 //- Added to Patrol Point Radius unless, Overridden //
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
30 float Radius = 10.0f;
31
32 //- Read Values //
33
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
35 FBlackboardKeySelector NextPatrolPoint;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
37 FBlackboardKeySelector NextBridgePatrolPoint;
38
39 //- Write Values //
40
41 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
42 FBlackboardKeySelector MoveTargetLocation;
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
44 FBlackboardKeySelector WaitTime;
45 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
46 FBlackboardKeySelector bBridgeAvailable;
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
48 FBlackboardKeySelector bPatrolBackwards;
49
50
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
52 bool bDebuggingMode = false;
53 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
54 bool bShowText = true;
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
56 float DebugPointSize = 20.0f;
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
58 float DebugPointDuration = 10.0f;
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
60 FColor TargetLocationColor = FColor::Yellow;
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
62 FColor PatrolPointColor = FColor::Red;
63
64
65protected:
66
67 virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
68
69 virtual FString GetStaticDescription() const override;
70#if WITH_EDITOR
71 virtual FName GetNodeIconName() const override;
72#endif // WITH_EDITOR
73 virtual uint16 GetInstanceMemorySize() const override;
74
75private:
77 {
78 AActor* TargetPatrolPointActor = nullptr;
79 class IPatrolInterface* TargetPatrolPoint = nullptr;
80 float WaitTime = 0.0f;
81 float TimeToWaitMin = 0.0f;
82 float TimeToWaitMax = 0.0f;
83 float Radius = 0.0f;
84
85 bool bIsBridgeAvailable = false;
86 FNavLocation RandomPoint;
87 bool bPatrolBackwards = false;
88 AActor* NextPatrolPointActor = nullptr;
89 AActor* PreviousPatrolPointActor = nullptr;
90 AActor* NextBridgePatrolPointActor = nullptr;
91 };
92
93};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
An interface class for patrol functionality.
Definition PatrolInterface.h:24
Definition BTTask_GetNextPatrolPoint.h:14
Definition BTTask_GetNextPatrolPoint.h:77
FNavLocation RandomPoint
Definition BTTask_GetNextPatrolPoint.h:86