Update AI to Be Hostile If Player is Holding a Weapon
This commit is contained in:
parent
dee776761e
commit
0901cc7973
@ -102,6 +102,10 @@ void AAI_EnemyController::OnTargetPerceptionUpdated(AActor* Actor, FAIStimulus c
|
||||
GetBlackboardComponent()->SetValueAsObject("TargetPlayer", Actor);
|
||||
GetBlackboardComponent()->SetValueAsVector("TargetLocation", Stimulus.StimulusLocation);
|
||||
GetBlackboardComponent()->SetValueAsBool("CanSeePlayer", true);
|
||||
if (PlayerCharacter->CurrentOverlayState != EOverlayState::Default)
|
||||
{
|
||||
GetBlackboardComponent()->SetValueAsBool("IsHostile", true);
|
||||
}
|
||||
}
|
||||
else if (!Stimulus.WasSuccessfullySensed() && Stimulus.Type == SightConfig->GetSenseID())
|
||||
{
|
||||
|
@ -105,6 +105,8 @@ private:
|
||||
public:
|
||||
AEndlessVendettaCharacter();
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
EOverlayState CurrentOverlayState = EOverlayState::Default;
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Stats")
|
||||
float CurrentHealth = 100.0f;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Stats")
|
||||
@ -168,7 +170,7 @@ public:
|
||||
FSetOverlayState SetOverlayStateEvent;
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Weapon")
|
||||
void SetOverlayState(EOverlayState OverlayState) const;
|
||||
void SetOverlayState(EOverlayState OverlayState);
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FRestrictedAreaStatusChangedSignature, bool, bIsInRestrictedAreaLmao);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user