Space Plunder
Loading...
Searching...
No Matches
BTS_CheckWeapon.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/BTService.h"
7#include "BTS_CheckWeapon.generated.h"
8
15UCLASS()
16class AITOOLKIT_API UBTS_CheckWeapon : public UBTService
17{
18 GENERATED_BODY()
19
20
21public:
23
24
25 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
26 FBlackboardKeySelector bHasWeapon;
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
28 FBlackboardKeySelector bNeedToReload;
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
30 FBlackboardKeySelector bOutOfAmmo;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
32 FBlackboardKeySelector WeaponFireMode;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
34 FBlackboardKeySelector WeaponFireRate;
35
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
37 bool bCheckHasWeapon = true;
38 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
39 bool bCheckNeedToReload = true;
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
41 bool bCheckAmmo = true;
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
43 bool bCheckFireMode = true;
44 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI")
45 bool bCheckFireRate = true;
46
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AI|Debugging")
48 bool bDebuggingMode = false;
49
50
51protected:
52 virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
53
54 virtual FString GetStaticDescription() const override;
55#if WITH_EDITOR
56 virtual FName GetNodeIconName() const override;
57#endif // WITH_EDITOR
58
59 virtual uint16 GetInstanceMemorySize() const override;
60
61private:
63 {
64 bool bOutOfAmmo = false;
65 bool bHasWeapon = false;
66 bool bNeedToReload = false;
67 uint8 WeaponFireMode = 0;
68 float WeaponFireRate = 0.0f;
69 };
70
71
72};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
This class is a Behavior Tree service node that checks the state of a weapon for an AI character.
Definition BTS_CheckWeapon.h:17
Definition BTS_CheckWeapon.h:63