Space Plunder
Loading...
Searching...
No Matches
ACustomAICharacter Class Reference

#include <CustomAICharacter.h>

Inheritance diagram for ACustomAICharacter:
ACustomCharacterBase IAIActionsInterface IStealthInterface IHitMarkerInterface ICompanionInterface AALSCharacter ICharacterWeaponPickups ICharacterInterface IBaseInterface IBaseServer AALSBaseCharacter AInteractableCharacter IALSCharacterInterface ACharacterBase ICharacterBaseInterface ISaveLoad IBaseInterface ACampaignAICharacter AHordeAICharacter

Public Member Functions

 ACustomAICharacter (const FObjectInitializer &ObjectInitializer)
 
virtual float Reload () override
 
virtual void Aim (const bool bStartAiming=true) override
 
virtual void CrouchAction (const bool bCrouch=true) override
 
virtual void ShootAction (const bool bStartShooting=true) override
 
virtual void ShootAtTargetAction (const bool bStartShooting=true, const FVector &TargetLocation=FVector::ZeroVector) override
 
virtual bool CheckAmmo (bool &bNeedToReload) const override
 
virtual bool GetHasWeapon () const override
 
virtual uint8 GetWeaponFireMode () const override
 
virtual float GetWeaponFireRate () const override
 
virtual void UpdateMovementSpeed (const EAIMovementSpeed MovementSpeed=EAIMovementSpeed::Running, const EAIMovementType MovementType=EAIMovementType::Normal) override
 
virtual bool PickupObject (const AActor *TargetObject) override
 
virtual float MeleeAttack () override
 
virtual float PlayAnimationMontage (UAnimMontage *Montage, const float PlayRate=1.0f, const float InTimeToStartMontageAt=0.0f, const bool bStopAllMontages=true) override
 
virtual FVector PredictLocation (AActor *TargetActor) override
 
virtual TArray< AActor * > GetHostileActors () const override
 
virtual TArray< AActor * > GetPerceivedObjects (TArray< EAIStimuliType > Filters) const override
 
virtual AActor * GetBestHostileActor () const override
 
virtual float GetMaxHealth () const override
 
virtual FVector GetLastKnownLocation (AActor *TargetActor, const TArray< EAISense > &Senses) override
 
class UAITraitsComponent * GetTraitsComponent () const
 
virtual void SetCanSprint (const bool CanSprint)
 
virtual void SetMaster (AActor *MasterActor) override
 
virtual void Follow () override
 
virtual void Pickup (AActor *TargetActor) override
 
virtual void Interact (AActor *TargetActor) override
 
virtual void StartCombat (AActor *TargetEnemy) override
 
virtual void Wait (const FVector &TargetLocation) override
 
virtual void GrabObject () override
 
virtual void AskToCrouch (const bool bValue) override
 Remove, have function in BaseInterface /.
 
virtual FCompanionData GetCompanionData (const bool bValue) override
 
virtual bool GetIsReadyToCommand () const override
 
virtual void StealthTakedown (AActor *Attacker, const int32 AnimationIndex) override
 
virtual void CancelStealthTakedown () override
 
virtual void StealthTakedownComplete () override
 
virtual bool GetCanPerformTakedown (const float Damage) const override
 
virtual void ShowStealthPrompt (const bool bShow=true) override
 
void OnStealthTakedown ()
 
void OnStealthTakedownComplete ()
 
void OnStealthTakedownCancelled ()
 
virtual void HitMarker (const AActor *ActorHit, const float Damage, const UDamageType *DamageType, const FName HitBone, const FVector HitLocation, const bool bKillingHit=false, const bool bInjuredPart=false) override
 
- Public Member Functions inherited from ACustomCharacterBase
 ACustomCharacterBase (const FObjectInitializer &ObjectInitializer)
 
bool IsCrouching () const
 
virtual ECharacterType GetCharacterType () const override
 
virtual bool GetIsDead () const override
 
virtual void StartThreatIndication (AActor *PawnThreat) override
 
void OnStartThreatIndication (AActor *PawnThreat)
 
virtual void StopThreatIndication () override
 
void OnStopThreatIndication ()
 
virtual void UpdateThreatIndication (const FVector &Location, const float DetectionAmount) override
 
void OnUpdateThreatIndication (const FVector &Location, const float DetectionAmount)
 
virtual USkeletalMeshComponent * GetCharacterSecondaryMesh () const override
 
virtual void SetCharacterVehicleMode (const EVehicleMode Mode) override
 
virtual bool GetCharacterHealth (float &Health, float &MaxHealth) const override
 
void OnCharacterVehicleModeChanged (const EVehicleMode Mode)
 
virtual void ForceWakeUp ()
 
virtual void SetGravityEnabled (const bool bValue) override
 
virtual FString GetObjectDisplayName () const override
 
virtual void DestroyActor (AActor *ActorToDestroy) override
 
virtual void DestroyActorOnClient (AActor *ActorToDestroy) override
 
virtual bool GetIsCharacter () const override
 
void SetPlayerName (FString Username)
 
virtual bool PickupAttachmentCheck (const FWeaponAttachment &In_WeaponAttachmentData) override
 
virtual void PickupAttachmentEvent (const FString &WeaponAttachmentID) override
 
virtual void ForwardMovementAction (float Value) override
 
virtual void RightMovementAction (float Value) override
 
virtual void Landed (const FHitResult &Hit) override
 
virtual EALSGait GetAllowedGait () const override
 
virtual void SprintAction (bool bValue) override
 
virtual void JumpAction (bool bValue) override
 
virtual bool CanJumpInternal_Implementation () const override
 
virtual void StanceAction () override
 
virtual void OnJumped_Implementation () override
 
void FlyUp ()
 
void FlyDown ()
 
void Server_OnPawnSpawn ()
 
virtual void OnPawnSpawned () override
 
void ReceiveOnPawnSpawn ()
 
- Public Member Functions inherited from AALSCharacter
 AALSCharacter (const FObjectInitializer &ObjectInitializer)
 
void UpdateHeldObject ()
 
void ClearHeldObject ()
 
void AttachToHand (UStaticMesh *NewStaticMesh, USkeletalMesh *NewSkeletalMesh, class UClass *NewAnimClass, bool bLeftHand, FVector Offset)
 
virtual ECollisionChannel GetThirdPersonTraceParams (FVector &TraceOrigin, float &TraceRadius) override
 
virtual FTransform GetThirdPersonPivotTarget () override
 
virtual FVector GetFirstPersonCameraTarget () override
 
- Public Member Functions inherited from AALSBaseCharacter
 AALSBaseCharacter (const FObjectInitializer &ObjectInitializer)
 
FORCEINLINE class UALSCharacterMovementComponentGetALSMovementComponent () const
 
virtual FVector GetLeftHandGoal () const override
 
virtual FVector GetRightHandGoal () const override
 
virtual EALSOverlayState GetCurrentOverlayState () const override
 
virtual bool GetIsMantling () const override
 
virtual FORCEINLINE IALSGravityMovementInterfaceGetALSGravityMovementInterface () const override
 
virtual void Ragdoll () override
 
virtual void PostInitializeComponents () override
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 
UAnimMontage * GetGetUpAnimation (bool bRagdollFaceUpState)
 
void Server_SetMeshLocationDuringRagdoll (FVector MeshLocation)
 
void SetMovementState (EALSMovementState NewState, bool bForce=false)
 
EALSMovementState GetMovementState () const
 
EALSMovementState GetPrevMovementState () const
 
void SetMovementAction (EALSMovementAction NewAction, bool bForce=false)
 
EALSMovementAction GetMovementAction () const
 
void SetStance (EALSStance NewStance, bool bForce=false)
 
EALSStance GetStance () const
 
void SetOverlayOverrideState (int32 NewState)
 
int32 GetOverlayOverrideState () const
 
void SetGait (EALSGait NewGait, bool bForce=false)
 
EALSGait GetGait () const
 
EALSGait GetDesiredGait () const
 
virtual void SetRotationMode (EALSRotationMode NewRotationMode, bool bForce=false)
 
void Server_SetRotationMode (EALSRotationMode NewRotationMode, bool bForce)
 
EALSRotationMode GetRotationMode () const
 
virtual void SetViewMode (EALSViewMode NewViewMode, bool bForce=false)
 
void Server_SetViewMode (EALSViewMode NewViewMode, bool bForce)
 
EALSViewMode GetViewMode () const
 
void SetOverlayState (EALSOverlayState NewState, bool bForce=false)
 
void SetGroundedEntryState (EALSGroundedEntryState NewState)
 
void Server_SetOverlayState (EALSOverlayState NewState, bool bForce)
 
EALSOverlayState GetOverlayState () const
 
EALSGroundedEntryState GetGroundedEntryState () const
 
void EventOnLanded ()
 
void Multicast_OnLanded ()
 
void EventOnJumped ()
 
void Multicast_OnJumped ()
 
void Server_PlayMontage (UAnimMontage *Montage, float PlayRate)
 
void Multicast_PlayMontage (UAnimMontage *Montage, float PlayRate)
 
void Server_StopMontage (const float InBlendOutTime, const UAnimMontage *Montage)
 
void Multicast_StopMontage (const float InBlendOutTime, const UAnimMontage *Montage)
 
void ReplicatedRagdollStart ()
 
void Server_RagdollStart ()
 
void Multicast_RagdollStart ()
 
void ReplicatedRagdollEnd ()
 
void Server_RagdollEnd (FVector CharacterLocation)
 
void Multicast_RagdollEnd (FVector CharacterLocation)
 
EALSStance GetDesiredStance () const
 
void SetDesiredStance (EALSStance NewStance)
 
void Server_SetDesiredStance (EALSStance NewStance)
 
void SetDesiredGait (EALSGait NewGait)
 
void Server_SetDesiredGait (EALSGait NewGait)
 
EALSRotationMode GetDesiredRotationMode () const
 
virtual void SetDesiredRotationMode (EALSRotationMode NewRotMode)
 
void Server_SetDesiredRotationMode (EALSRotationMode NewRotMode)
 
void SetActorLocationAndTargetRotation (FVector NewLocation, FRotator NewRotation)
 
bool HasMovementInput () const
 
FALSMovementSettings GetTargetMovementSettings () const
 
EALSGait GetActualGait (EALSGait AllowedGait) const
 
void OnBreakfall ()
 
virtual void OnBreakfall_Implementation ()
 
virtual float PlayReplicatedMontage (UAnimMontage *MontageToPlay, const float InPlayRate, const EMontagePlayReturnType ReturnValueType, const float InTimeToStartMontageAt, const bool bStopAllMontages) override
 
virtual void StopReplicatedMontage (const float InBlendOutTime, const UAnimMontage *Montage) override
 
void Replicated_PlayMontage (UAnimMontage *Montage, float PlayRate)
 
virtual void Replicated_PlayMontage_Implementation (UAnimMontage *Montage, float PlayRate)
 
UAnimMontage * GetRollAnimation ()
 
float GetAnimCurveValue (FName CurveName) const
 
void SetVisibleMesh (USkeletalMesh *NewSkeletalMesh)
 
void Server_SetVisibleMesh (USkeletalMesh *NewSkeletalMesh)
 
bool IsRightShoulder () const
 
void SetRightShoulder (const bool bNewRightShoulder)
 
bool IsAimingDownSights () const
 
virtual bool GetCanAimDownSights () const
 
void SetAimDownSights (const bool bNewAimDownSights)
 
virtual FVector GetAimDownSightCameraTarget () const
 
virtual float GetAimDownSightFOV () const
 
void GetCameraParameters (float &TPFOVOut, float &FPFOVOut, bool &bRightShoulderOut) const
 
void SetCameraBehavior (UALSPlayerCameraBehavior *CamBeh)
 
FVector GetAcceleration () const
 
bool IsMoving () const
 
bool GetIsFlying () const
 
FVector GetMovementInput () const
 
float GetMovementInputAmount () const
 
float GetSpeed () const
 
FRotator GetAimingRotation () const
 
float GetAimYawRate () const
 
void CameraUpAction (float Value)
 
void CameraRightAction (float Value)
 
virtual void AimAction (bool bValue)
 
virtual void CameraTapAction ()
 
virtual void CameraHeldAction ()
 
void WalkAction ()
 
void RagdollAction ()
 
void VelocityDirectionAction ()
 
void LookingDirectionAction ()
 
- Public Member Functions inherited from AInteractableCharacter
 AInteractableCharacter (const FObjectInitializer &ObjectInitializer)
 
virtual USceneComponent * GetThrowPoint () const override
 
virtual void ReceiveStartFocus (AActor *Caller)
 
virtual void ReceiveEndFocus (AActor *Caller)
 
virtual void ReceiveOnInteract (AActor *Caller, const EInteractionType InteractionType)
 
virtual void ReceiveOnEndInteract (AActor *Caller)
 
virtual void ReceiveOnOverlap (AActor *Caller)
 
virtual void ReceiveOnEndOverlap (AActor *Caller)
 
virtual void ReceiveToggleSwitch (AActor *Caller, const bool bOn)
 
- Public Member Functions inherited from ACharacterBase
 ACharacterBase (const FObjectInitializer &ObjectInitializer)
 
virtual bool SaveGame () override
 
virtual bool LoadGame () override
 
virtual USkeletalMeshComponent * GetCharacterMesh () const override
 
virtual UPrimitiveComponent * GetPrimitiveComponent () override
 
virtual void RagdollStop () override
 
virtual FCharacterBaseSkillsGetCharacterSkills () override
 
virtual bool GetAudioSocketLocation (const FName &AudioSocket, FVector &Location) const override
 
virtual FCharacterInfo GetCharacterInfo () const override
 
virtual void GetThrowStats (FTransform &OutTransform, FVector &OutThrowForce) const override
 
virtual void CharacterModeChanged (const FGameplayTag &NewMode) override
 
virtual int32 GetStrength () const
 
virtual int32 GetPerception () const
 
virtual int32 GetEndurance () const
 
virtual int32 GetCharisma () const
 
virtual int32 GetIntelligence () const
 
virtual int32 GetAgility () const
 
virtual int32 GetWeaponSkill () const
 
virtual int32 GetStealth () const
 
virtual int32 GetLuck () const
 
virtual int32 GetSkillPoints () const
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void SetupComponents (AController *ControllerReference=nullptr, AActor *HUDReference=nullptr, bool bIsLocallyControlled=false) override
 
virtual void Tick (const float DeltaTime) override
 
virtual void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 
virtual void SetHandsTied (const bool bValue) override
 
virtual FInteractionData GetInteractionData () const override
 
virtual void OnInteract (AActor *Caller, const int32 SelectedInteraction) override
 
virtual bool OnOverlap (AActor *Caller) override
 
virtual void StartFocus () override
 
virtual void EndFocus () override
 
virtual void ReceiveOnInteract_Implementation (AActor *Caller, const EInteractionType InteractionType) override
 
virtual void ReceiveStartFocus_Implementation (AActor *Caller) override
 
virtual void ReceiveEndFocus_Implementation (AActor *Caller) override
 
virtual void OptimizationWaveChanged (const EOptimizationWave NewWave)
 
void OnOptimizationWaveChanged (const EOptimizationWave NewWave)
 
virtual void AIStateChanged (EAIStateType State)
 
virtual EFactionType GetCharacterFaction () const override
 
virtual bool CanSprint () const override
 
virtual void RagdollStart () override
 
virtual void RagdollEnd () override
 
virtual void NotifyHit (UPrimitiveComponent *MyComp, AActor *Other, UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit) override
 
virtual void FallOver (const float WaitTime) override
 
virtual void GetUpFromFall () override
 
virtual int32 PickupGunEvent (const FWeaponData_T In_WeaponData) override
 
virtual bool PickupGunCheck (const FWeaponData_T &In_WeaponData) override
 
virtual void WeaponEquipped (const TArray< FWeaponData_T > &Weapons, const int32 CurrentWeaponIndex) override
 
virtual void WeaponStateChanged (const struct FPlayerWeaponState &PlayerWeaponState) override
 
virtual void OnDeath (AActor *OwningActor, const EDeathType DeathType, AActor *DeathCauser, AController *DeathInstigator) override
 
virtual void OnDeathReplicated () override
 
virtual void OnInjuredBodyPart (const EBodyPartName InjuredBodyPart, const FVector &HitLocation, const TArray< FBodyPart > &AllBodyParts) override
 
virtual void OnKnockedOut (const UDamageType *DamageType, const float WaitTime) override
 
virtual void OnWakeUp () override
 
virtual void OnFullDamageHit (AController *InstigatedBy, const float TotalDamage, const UDamageType *DamageType, const FName &HitBone, const FVector &HitLocation, const bool bKillingHit, const bool bInjuredPart) override
 
void CheckForObstacle ()
 
void JumpOverObstacle ()
 
- Protected Member Functions inherited from ACustomCharacterBase
bool GetHandsTied () const
 
virtual void AimAssistOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, const int32 OtherBodyIndex, const bool bFromSweep, const FHitResult &SweepResult)
 
void OnAimAssistOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, const int32 OtherBodyIndex, const bool bFromSweep, const FHitResult &SweepResult)
 
virtual void AimAssistRevertSize ()
 
virtual void OnHealthAndShieldChanged (float Health, float MaxHealth, float ShieldHealth, float MaxShieldHealth, const class UDamageType *DamageType)
 
virtual void OnShieldBreak ()
 
virtual void OnKnockedOut (const class UDamageType *DamageType, const float WaitTime)
 
FPlayerDeath GetPlayerDeathInfo (const EDeathType DeathType, AActor *DeathCauser, const AController *DeathInstigator) const
 
USkeletalMeshComponent * GetCustomMesh () const
 
virtual void FirePressedAction ()
 
virtual void SaveGameData ()
 
virtual void LoadGameData ()
 
virtual bool SaveCharacterData ()
 
virtual bool LoadCharacterData ()
 
virtual void LoadComponentsSaveData ()
 
virtual void SaveComponentsData ()
 
virtual void UpdateStaminaHUD ()
 
virtual void Sprinting ()
 
virtual void StopSprinting ()
 
virtual void RechargeStamina ()
 
virtual void SetMaxStamina (const float AmountToAdd)
 
void OnCharacterReadyReplicated ()
 
- Protected Member Functions inherited from AALSCharacter
virtual void OnOverlayStateChanged (EALSOverlayState PreviousState) override
 
void UpdateHeldObjectAnimations ()
 
- Protected Member Functions inherited from AALSBaseCharacter
void RagdollUpdate (float DeltaTime)
 
void SetActorLocationDuringRagdoll (float DeltaTime)
 
virtual void OnMovementModeChanged (EMovementMode PrevMovementMode, uint8 PreviousCustomMode=0) override
 
virtual void OnMovementStateChanged (EALSMovementState PreviousState)
 
virtual void OnMovementActionChanged (EALSMovementAction PreviousAction)
 
virtual void OnStanceChanged (EALSStance PreviousStance)
 
virtual void OnRotationModeChanged (EALSRotationMode PreviousRotationMode)
 
virtual void OnGaitChanged (EALSGait PreviousGait)
 
virtual void OnViewModeChanged (EALSViewMode PreviousViewMode)
 
virtual void OnVisibleMeshChanged (const USkeletalMesh *PreviousSkeletalMesh)
 
virtual void OnStartCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust) override
 
virtual void OnEndCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust) override
 
void OnLandFrictionReset ()
 
void SetEssentialValues (float DeltaTime)
 
void UpdateCharacterMovement ()
 
void UpdateGroundedRotation (float DeltaTime)
 
void UpdateInAirRotation (float DeltaTime)
 
void SmoothCharacterRotation (FRotator Target, float TargetInterpSpeed, float ActorInterpSpeed, float DeltaTime)
 
float CalculateGroundedRotationRate () const
 
void LimitRotation (float AimYawMin, float AimYawMax, float InterpSpeed, float DeltaTime)
 
void SetMovementModel ()
 
void ForceUpdateCharacterState ()
 
void OnRep_RotationMode (EALSRotationMode PrevRotMode)
 
void OnRep_ViewMode (EALSViewMode PrevViewMode)
 
void OnRep_OverlayState (EALSOverlayState PrevOverlayState)
 
void OnRep_VisibleMesh (const USkeletalMesh *PreviousSkeletalMesh)
 
void HandleNonMovingRotation (float DeltaTime)
 
- Protected Member Functions inherited from AInteractableCharacter
virtual void InteractionDataUpdated ()
 
- Protected Member Functions inherited from ACharacterBase
void OnFallOver (const float WaitTime)
 
void OnGetUpFromFall ()
 
void OnRep_CharacterDeath ()
 
IPlayerControllerInterfaceGetPlayerControllerInterface ()
 
IPlayerStateInterfaceGetPlayerStateInterface ()
 
void LogDebugError (const FString &Message) const
 
void LogDebugError (const FString &Message, const int32 Value) const
 
void LogDebugError (const FString &Message, const float Value) const
 
void LogDebugWarning (const FString &Message) const
 
void LogDebugWarning (const FString &Message, const int32 Value) const
 
void LogDebugWarning (const FString &Message, const float Value) const
 
void LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const
 
void LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const
 
void SetCategoryName (const FLogCategoryBase &Category)
 

Protected Attributes

FName StealthTakedownName = "Stealth_Attack_NonLethal_01"
 
bool bStealthMotionWarp = true
 
bool bStealthMotionWarpFromComponent = true
 
FName StealthMotionWarpBoneName = FName("root")
 
bool bStealthMotionWarpFollowComponent = true
 
float StealthActorDistance = -175.0f
 
float StealthActorForward = 65.0f
 
float StealthActorZ = 90.0f
 
float StealthActorRight = 20.0f
 
AActor * StealthCurrentAttacker = nullptr
 
TArray< UAnimMontage * > StealthTakedownAnims
 
bool bGettingTakedown = false
 
class UCompanionComponent * CompanionComponent
 
class UCharacterShootingComponentCharacterShootingComponent
 
class UAITraitsComponent * CharacterTraitsComponent
 
class UStealthTakedownCollisionStealthTakedownCollision
 
class UOptimizationProxyComponent * OptimizationComponent
 
class UMotionWarpingComponent * MotionWarping
 
bool bCanSprint = true
 
bool bShouldCheckForJumps = true
 
bool bShouldCheckForDoors = true
 
float JumpCheckFrequency = 1.0f
 
float VelocityAdditionalOffset = 25.0f
 
float SphereStartOffset = 65.0f
 
float VelocityClampMax = 100.0f
 
float SphereTraceRadius = 45.0f
 
float AimAssistSize = 160.0f
 
float AimAssistDistanceMultiplier = 0.5f
 
- Protected Attributes inherited from ACustomCharacterBase
class UCharacterHealthComponent * CharacterHealthComponent
 
class UHealthBarWidgetComponent * HealthBarComponent
 
class UPhysicalAnimationComponent * PhysicalAnimationComponent
 
class UPhysicalHitReactionsComponentPhysicalHitReactionComponent
 
class UMeleeComponent * MeleeComponent
 
class UFootstepFXHandler * FootstepsComponent
 
class USphereComponent * AimAssistSphereComponent
 Remove? use sphere trace instead //.
 
class URecoilAnimationComponent * RecoilAnimationComponent
 
class UALSMantleComponentMantleComponentReference
 
USkeletalMeshComponent * CustomSkeletalMesh
 
float MultiplayerStartDelay = 0.5f
 
float FallDamageOffset = 550.0f
 
float FallDamageDivisor = 5.0f
 
ECharacterType CharacterType = ECharacterType::Human
 
FString DisplayName = "Default Name"
 
bool bForceWalkWhileAiming = true
 
bool bToggleSprint = true
 
bool bSprinting = true
 
float SprintDeadZone = 0.5f
 
float FlyingScaleValue = 1.0f
 
bool bIsFlyingUp = false
 
bool bIsFlyingDown = false
 
float Stamina = 100.0f
 
float MinRequiredStamina = 0.2f
 
float MaxStamina = 60.0f
 
float MaxStaminaDefault = 60.0f
 
float MaxPossibleStamina = 150.0f
 
float MinStamina = 10.0f
 
float StaminaDepletionRate = 0.05f
 
float StaminaDepletionIncrement = 0.5f
 
float StaminaRechargeRate = 0.05f
 
float StaminaRechargeIncrement = 0.5f
 
float StaminaRechargeDelayTime = 2.0f
 
float StaminaJumpAmount = 10.0f
 
float ThrowStrength = 500.0f
 
bool bHandsTied = false
 
float AimAssistRadius = 160.0f
 
float AimAssistShrinkTime = 3.0f
 
bool bIsNPC = false
 
bool bIsDead = false
 
bool bCharacterReady = false
 
- Protected Attributes inherited from AALSCharacter
TObjectPtr< USceneComponent > HeldObjectRoot = nullptr
 
TObjectPtr< USkeletalMeshComponent > SkeletalMesh = nullptr
 
TObjectPtr< UStaticMeshComponent > StaticMesh = nullptr
 
- Protected Attributes inherited from AALSBaseCharacter
TObjectPtr< UALSCharacterMovementComponentMyCharacterMovementComponent
 
bool bOptimizeGroundRotation = true
 
bool bOptimizeAnimValues = true
 
FALSAnimValues AnimValues
 
IALSAnimInterfaceAnimInstanceInterface
 
EALSRotationMode DesiredRotationMode = EALSRotationMode::LookingDirection
 
EALSGait DesiredGait = EALSGait::Running
 
EALSStance DesiredStance = EALSStance::Standing
 
float LookUpDownRate = 1.25f
 
float LookLeftRightRate = 1.25f
 
float RollDoubleTapTimeout = 0.3f
 
bool bBreakFall = false
 
bool bSprintHeld = false
 
float ThirdPersonFOV = 90.0f
 
float FirstPersonFOV = 90.0f
 
bool bRightShoulder = false
 
bool bAimDownSights = false
 
FDataTableRowHandle MovementModel
 
FVector Acceleration = FVector::ZeroVector
 
bool bIsMoving = false
 
bool bIsFlying = false
 
bool bHasMovementInput = false
 
FRotator LastVelocityRotation
 
FRotator LastMovementInputRotation
 
float Speed = 0.0f
 
float MovementInputAmount = 0.0f
 
float AimYawRate = 0.0f
 
float EasedMaxAcceleration = 0.0f
 
FVector ReplicatedCurrentAcceleration = FVector::ZeroVector
 
FRotator ReplicatedControlRotation = FRotator::ZeroRotator
 
TObjectPtr< USkeletalMesh > VisibleMesh = nullptr
 
EALSOverlayState OverlayState = EALSOverlayState::Default
 
EALSGroundedEntryState GroundedEntryState
 
EALSMovementState MovementState = EALSMovementState::None
 
EALSMovementState PrevMovementState = EALSMovementState::None
 
EALSMovementAction MovementAction = EALSMovementAction::None
 
EALSRotationMode RotationMode = EALSRotationMode::LookingDirection
 
EALSGait Gait = EALSGait::Walking
 
EALSStance Stance = EALSStance::Standing
 
EALSViewMode ViewMode = EALSViewMode::ThirdPerson
 
int32 OverlayOverrideState = 0
 
FALSMovementStateSettings MovementData
 
FRotator TargetRotation = FRotator::ZeroRotator
 
FRotator InAirRotation = FRotator::ZeroRotator
 
float YawOffset = 0.0f
 
bool bBreakfallOnLand = true
 
float BreakfallOnLandVelocity = 700.0f
 
bool bReversedPelvis = false
 
bool bRagdollOnLand = false
 
float RagdollOnLandVelocity = 1000.0f
 
bool bRagdollOnGround = false
 
bool bRagdollFaceUp = false
 
FVector LastRagdollVelocity = FVector::ZeroVector
 
FVector TargetRagdollLocation = FVector::ZeroVector
 
float ServerRagdollPull = 0.0f
 
EVisibilityBasedAnimTickOption DefVisBasedTickOp
 
bool bPreRagdollURO = false
 
FVector PreviousVelocity = FVector::ZeroVector
 
float PreviousAimYaw = 0.0f
 
TObjectPtr< UALSPlayerCameraBehaviorCameraBehavior
 
float LastStanceInputTime = 0.0f
 
FTimerHandle OnLandedFrictionResetTimer
 
FRotator AimingRotation = FRotator::ZeroRotator
 
bool bEnableNetworkOptimizations = false
 
bool bForceEnableNetworkOptimizationsOff = false
 
- Protected Attributes inherited from AInteractableCharacter
USceneComponent * ThrowPoint
 
class UInteractionComponent * InteractionComponent
 
class UInteractableActorComponent * InteractableActorComponent
 
class USphereComponent * InteractionSphere
 
class UInventoryComponent * InventoryComponent
 
class UAudioReactionComponent * AudioReactionComponent
 
bool bAlwaysShowOutline = false
 
- Protected Attributes inherited from ACharacterBase
bool bDebuggingMode = false
 
FCharacterBaseSkills CharacterSkills
 
FCharacterInfo CharacterInfo
 
bool bDead = false
 
float PickupThrowIntensity = 500.0f
 
bool bCanBePushed = false
 
float HitVelocityThreshold = 50.0f
 
float HitVelocityMultiplier = 5.0f
 
float HitReactionMultiplier = 0.01f
 
bool bPushHitReaction = true
 
bool bAddMovementInput = true
 
bool bAddCharacterMovement = true
 
float PushFallVelocityThreshold = 200.0f
 
float PushedFallVelocityThreshold = 500.0f
 
float PushedFallOverWaitTime = 2.0f
 

Private Attributes

UBlackboardComponent * BlackboardComponent
 
FTimerHandle SetupCompleteDelayTimerHandle
 
FTimerHandle JumpCheckTimerHandle
 

Additional Inherited Members

- Public Attributes inherited from AALSBaseCharacter
float GravityMultiplier = 9.8f
 
FJumpPressedSignature JumpPressedDelegate
 
FOnJumpedSignature OnJumpedDelegate
 
FRagdollStateChangedSignature RagdollStateChangedDelegate
 
- Public Attributes inherited from ACharacterBase
FOnCharacterDeath OnCharacterDeath
 

Constructor & Destructor Documentation

◆ ACustomAICharacter()

ACustomAICharacter::ACustomAICharacter ( const FObjectInitializer & ObjectInitializer)
35 : ACustomCharacterBase(ObjectInitializer)
36{
37 bIsNPC = true;
38 CharacterHealthComponent->bCanBeKnockedOut = true;
39 CompanionComponent = CreateDefaultSubobject<UCompanionComponent>(TEXT("Companion Component"));
40 CharacterShootingComponent = CreateDefaultSubobject<UCharacterShootingComponent>(TEXT("Shooting Component"));
41 CharacterShootingComponent->OnWeaponEquipped.AddDynamic(this, &ACustomCharacterBase::WeaponEquipped);
42 CharacterShootingComponent->OnWeaponStateChanged.AddDynamic(this, &ACustomCharacterBase::WeaponStateChanged);
43 CharacterShootingComponent->PrimaryComponentTick.bCanEverTick = false;
44
45 CharacterTraitsComponent = CreateDefaultSubobject<UAITraitsComponent>("AI Traits");
46 StealthTakedownCollision = CreateDefaultSubobject<UStealthTakedownCollision>("Stealth Takedown Collision");
47 StealthTakedownCollision->SetupAttachment(GetCustomMesh(), FName("Pelvis"));
48 StealthTakedownCollision->SetCollisionObjectType(ECC_PhysicsBody);
49 StealthTakedownCollision->SetCanEverAffectNavigation(false);
50 // OnTakeAnyDamage.AddUniqueDynamic();
51
52 GetCapsuleComponent()->BodyInstance.bNotifyRigidBodyCollision = true;
53
54
55 GetMesh()->bEnableUpdateRateOptimizations = false;
56
57 OptimizationComponent = CreateDefaultSubobject<UOptimizationProxyComponent>("Optimization Component");
58 OptimizationComponent->OnChangeWave.AddUniqueDynamic(this, &ACustomAICharacter::OptimizationWaveChanged);
59
60 AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned;
61 InteractableActorComponent->InteractionData.InteractionTypes.Add(FInteractionType(EInteractionType::Takedown, true));
62 InteractableActorComponent->InteractionData.InteractionTypes.Add(FInteractionType(EInteractionType::KnockOut, true));
63 InteractableActorComponent->InteractionData.InteractionTypes.Add(FInteractionType(EInteractionType::Tie, true));
64 InteractableActorComponent->InteractionData.InteractionTypes.Add(FInteractionType(EInteractionType::Wakeup, true));
65 InteractableActorComponent->InteractionData.InteractionTypes.Add(FInteractionType(EInteractionType::Command, true));
66
67 MotionWarping = CreateDefaultSubobject<UMotionWarpingComponent>(TEXT("Motion Warping"));
68
69}
virtual void OptimizationWaveChanged(const EOptimizationWave NewWave)
Definition CustomAICharacter.cpp:491
class UMotionWarpingComponent * MotionWarping
Definition CustomAICharacter.h:212
class UStealthTakedownCollision * StealthTakedownCollision
Definition CustomAICharacter.h:208
class UCompanionComponent * CompanionComponent
Definition CustomAICharacter.h:202
class UOptimizationProxyComponent * OptimizationComponent
Definition CustomAICharacter.h:210
class UAITraitsComponent * CharacterTraitsComponent
Definition CustomAICharacter.h:206
class UCharacterShootingComponent * CharacterShootingComponent
Definition CustomAICharacter.h:204
ACustomCharacterBase(const FObjectInitializer &ObjectInitializer)
Definition CustomCharacterBase.cpp:40
bool bIsNPC
Definition CustomCharacterBase.h:383
virtual void WeaponEquipped(const TArray< FWeaponData_T > &Weapons, const int32 CurrentWeaponIndex)
Definition CustomCharacterBase.cpp:764
USkeletalMeshComponent * GetCustomMesh() const
Definition CustomCharacterBase.h:381
virtual void WeaponStateChanged(const struct FPlayerWeaponState &PlayerWeaponState)
Definition CustomCharacterBase.cpp:777
class UCharacterHealthComponent * CharacterHealthComponent
Definition CustomCharacterBase.h:190
class UInteractableActorComponent * InteractableActorComponent
Definition InteractableCharacter.h:58
Definition BaseData.h:333

Member Function Documentation

◆ Aim()

void ACustomAICharacter::Aim ( const bool bStartAiming = true)
overridevirtual

Implements IAIActionsInterface.

652{
653 if(CharacterShootingComponent != nullptr)
654 {
655 AimAction(bStartAiming);
656 if(bStartAiming)
657 {
658 CharacterShootingComponent->AimPressedAction();
659 // SetRotationMode(EALSRotationMode::Aiming);
660 }
661 else
662 {
663 CharacterShootingComponent->AimReleasedAction();
664 // AimAction()
665 // SetRotationMode(EALSRotationMode::VelocityDirection);
666 }
667 return;
668 }
669 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("Aim Action Failed in Custom AI Character"));}
670
671}
virtual void AimAction(bool bValue)
Definition ALSBaseCharacter.cpp:1837
bool bDebuggingMode
Definition CharacterBase.h:145

◆ AIStateChanged()

void ACustomAICharacter::AIStateChanged ( EAIStateType State)
protectedvirtual
570{
571
572 // if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("AI State: %hhd"), State);}
573 // const uint8 Byte = (uint8)State;
574 // if(BlackboardComponent != nullptr)
575 // {
576 // BlackboardComponent->SetValueAsEnum(FName("CurrentAIState"), Byte);
577 // }
578}

◆ AskToCrouch()

void ACustomAICharacter::AskToCrouch ( const bool bValue)
overridevirtual

Remove, have function in BaseInterface /.

Implements ICompanionInterface.

1005{
1006 CrouchAction(bValue);
1007}
virtual void CrouchAction(const bool bCrouch=true) override
Definition CustomAICharacter.cpp:673

◆ BeginPlay()

void ACustomAICharacter::BeginPlay ( )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

Reimplemented in ACampaignAICharacter.

87{
88 Super::BeginPlay();
89 GetWorld()->GetTimerManager().SetTimer(SetupCompleteDelayTimerHandle, this, &ACustomAICharacter::OnPawnSpawned, MultiplayerStartDelay);
90 BlackboardComponent = UAIBlueprintHelperLibrary::GetBlackboard(this);
91 GetWorldTimerManager().SetTimer(JumpCheckTimerHandle, this, &ACustomAICharacter::CheckForObstacle,JumpCheckFrequency, true);
92 ShowStealthPrompt(false);
93 //@TODO if(GetGameDifficulty() == Easy)
94 // AimAssistComponent->SetSphereRadius, *2;
95}
virtual void OnPawnSpawned() override
Definition CharacterBase.cpp:121
float JumpCheckFrequency
Definition CustomAICharacter.h:273
FTimerHandle SetupCompleteDelayTimerHandle
Definition CustomAICharacter.h:298
void CheckForObstacle()
Definition CustomAICharacter.cpp:97
virtual void ShowStealthPrompt(const bool bShow=true) override
Definition CustomAICharacter.cpp:485
UBlackboardComponent * BlackboardComponent
Definition CustomAICharacter.h:296
FTimerHandle JumpCheckTimerHandle
Definition CustomAICharacter.h:300
float MultiplayerStartDelay
Definition CustomCharacterBase.h:229

◆ CancelStealthTakedown()

void ACustomAICharacter::CancelStealthTakedown ( )
overridevirtual

Implements IStealthInterface.

389{
390 bGettingTakedown = false;
391 bCanBePushed = true;
392 if(MeleeComponent != nullptr)
393 {
394 MeleeComponent->SetCanAttack(true);
395 }
396 if(BlackboardComponent != nullptr)
397 {
398 BlackboardComponent->ResumeObserverNotifications(true);
399 }
400 const AAIController* AIController = Cast<AAIController>(GetController());
401 if(GetController() != nullptr && AIController != nullptr && AIController->BrainComponent != nullptr)
402 {
403 AIController->BrainComponent->StartLogic();
404 }
405 ShowStealthPrompt(false);
406 if(MotionWarping)
407 {
408 MotionWarping->RemoveWarpTarget(StealthTakedownName);
409 }
410 SetActorEnableCollision(true);
412}
bool bCanBePushed
Definition CharacterBase.h:161
void OnStealthTakedownCancelled()
FName StealthTakedownName
Definition CustomAICharacter.h:140
bool bGettingTakedown
Definition CustomAICharacter.h:167
class UMeleeComponent * MeleeComponent
Definition CustomCharacterBase.h:204

◆ CanSprint()

virtual bool ACustomAICharacter::CanSprint ( ) const
inlineoverrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

228{return bCanSprint;};
bool bCanSprint
Definition CustomAICharacter.h:233

◆ CheckAmmo()

bool ACustomAICharacter::CheckAmmo ( bool & bNeedToReload) const
overridevirtual

Returns if out of ammo

Implements IAIActionsInterface.

722{
723 bNeedToReload = false;
724 if(CharacterShootingComponent != nullptr)
725 {
726 int32 CurrentAmmo = 0;
727 const int32 TotalAmmoLeft = CharacterShootingComponent->GetCurrentWeaponAmmo(CurrentAmmo);
728 if(CurrentAmmo == 0){bNeedToReload = true;}
729 return (TotalAmmoLeft <= 0);
730 }
731 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("CheckAmmo Action Failed in Custom AI Character"));}
732 return false;
733}

◆ CheckForObstacle()

void ACustomAICharacter::CheckForObstacle ( )
protected
98{
99 TRACE_CPUPROFILER_EVENT_SCOPE(ACustomAICharacter::CheckForObstacle);
100
101 if(!bShouldCheckForJumps){return;}
102 if(GetVelocity().Length() <= 0.0f){return;}
103
104 TArray<AActor*> ActorsToIgnore;
105 EDrawDebugTrace::Type DebugType = EDrawDebugTrace::None;
106 if(bDebuggingMode){DebugType = EDrawDebugTrace::ForDuration;}
107 FHitResult LineHitResult;
108
109 //- Calculate the line
110
111 //- Half of the Actors Height (z) //
112 FVector AdjustHeight(0,0,(GetActorLocation().Z / 2));
113 //- Direction the character is facing //
114 FVector Location;
115 FRotator Rotation;
116 GetActorEyesViewPoint(Location, Rotation);
117
118 //- Forward Vector From Eyes rotation as body has problems
119 FVector ForwardVector = Rotation.Vector();
120
121 //- if we have it available, get the direction toward the next move location //
122 bool bMovingTowardPoint = false;
123 // if(BlackboardComponent != nullptr)
124 // {
125 // FVector MoveTargetLocation = BlackboardComponent->GetValueAsVector(FName("MoveTargetLocation"));
126 // if(MoveTargetLocation != FVector::ZeroVector && !MoveTargetLocation.IsNearlyZero())
127 // {
128 // //- Have the height half of the actors height //
129 // FRotator LookAtRotation = UKismetMathLibrary::FindLookAtRotation(GetActorLocation(), (MoveTargetLocation + AdjustHeight));
130 // ForwardVector = LookAtRotation.Vector();
131 // bMovingTowardPoint = true;
132 // }
133 // }
134 //- Times by Velocity and an offset in case walking slow, and Add to Original Actor Location //
135 FVector LineEnd = GetActorLocation() + ((GetVelocity().Length() + VelocityAdditionalOffset) * ForwardVector);
136
137 //- If we're moving toward the characters direction minus the height by half //
138 // if(!bMovingTowardPoint){LineEnd -= AdjustHeight;}
139
140 bool bLineHit = UKismetSystemLibrary::LineTraceSingle(this, GetActorLocation(), LineEnd,UEngineTypes::ConvertToTraceType(ECC_GameTraceChannel3),
141 false, ActorsToIgnore, DebugType, LineHitResult, true, FLinearColor::Red, FLinearColor::Green, JumpCheckFrequency);
142 if(!bLineHit){return;}
143 //- start the trace at the actor location + an offset toward the facing direction
144 FVector SphereTraceStart = LineHitResult.TraceStart + GetActorRotation().Vector() * SphereStartOffset;
145
146
147 float ClampedVelocity = UKismetMathLibrary::FClamp((GetVelocity().Length() + VelocityAdditionalOffset), VelocityAdditionalOffset,VelocityClampMax);
148 FVector TraceEnd = SphereTraceStart + (GetActorRotation().Vector() * ClampedVelocity);
149
150 FHitResult SphereHitResult;
151 bool bSphereHit = UKismetSystemLibrary::SphereTraceSingle(this, SphereTraceStart, TraceEnd, SphereTraceRadius, UEngineTypes::ConvertToTraceType(ECC_GameTraceChannel3),
152 false, ActorsToIgnore, DebugType,SphereHitResult, true,FLinearColor::Red, FLinearColor::Green, JumpCheckFrequency);
153 if(!bSphereHit){return;}
154
155 //- check if its a door we can open? //
156 if(SphereHitResult.GetActor() != nullptr && bShouldCheckForDoors)
157 {
158 IBaseInterface* BaseActor = Cast<IBaseInterface>(SphereHitResult.GetActor());
159 if(BaseActor != nullptr)
160 {
161 FInteractionType DefaultInteraction;
162 if(BaseActor->GetInteractionData().StimuliType == EAIStimuliType::Door &&
163 BaseActor->GetInteractionData().GetDefaultInteraction(DefaultInteraction) &&
164 DefaultInteraction.InteractionType == EInteractionType::Open)
165 {
166 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("Door In the way"));}
167 IInteractionInterface* InteractableActor = Cast<IInteractionInterface>(SphereHitResult.GetActor());
168 if(InteractableActor != nullptr)
169 {
170 InteractableActor->OnInteract(this);
171 return;
172 }
173 }
174 }
175 }
177
178}
float SphereTraceRadius
Definition CustomAICharacter.h:283
float SphereStartOffset
Definition CustomAICharacter.h:279
bool bShouldCheckForDoors
Definition CustomAICharacter.h:270
float VelocityClampMax
Definition CustomAICharacter.h:281
float VelocityAdditionalOffset
Definition CustomAICharacter.h:276
bool bShouldCheckForJumps
Definition CustomAICharacter.h:268
void JumpOverObstacle()
Definition CustomAICharacter.cpp:180
Definition BaseInterface.h:17
Definition InteractionInterface.h:18
virtual void OnInteract(AActor *Caller, const int32 SelectedInteraction=0)=0
EInteractionType InteractionType
Definition BaseData.h:337

◆ CrouchAction()

void ACustomAICharacter::CrouchAction ( const bool bCrouch = true)
overridevirtual

Will crouch the Character, defaults to true

Implements IAIActionsInterface.

674{
675 if(bCrouch)
676 {
677 Crouch();
678 }
679 else
680 {
681 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("Uncrouch"));}
682 UnCrouch();
683 }
684}

◆ EndFocus()

virtual void ACustomAICharacter::EndFocus ( )
overrideprotectedvirtual

◆ FallOver()

void ACustomAICharacter::FallOver ( const float WaitTime)
overrideprotectedvirtual

Reimplemented from ACharacterBase.

1062{
1063 Super::FallOver(WaitTime);
1064 if(BlackboardComponent != nullptr)
1065 {
1066 // BlackboardComponent->SetValueAsBool(FName("bKnockedOut"), true);
1067 BlackboardComponent->SetValueAsFloat(FName("WaitTime"), WaitTime);
1068 }
1069 if(MeleeComponent != nullptr)
1070 {
1071 MeleeComponent->SetCanAttack(false);
1072 }
1073}

◆ Follow()

void ACustomAICharacter::Follow ( )
overridevirtual

Implements ICompanionInterface.

953{
954 if(CompanionComponent != nullptr)
955 {
956 CompanionComponent->Follow();
957 }
958}

◆ GetBestHostileActor()

AActor * ACustomAICharacter::GetBestHostileActor ( ) const
overridevirtual

Implements IAIActionsInterface.

914{
915 if(CharacterTraitsComponent != nullptr)
916 {
917 return CharacterTraitsComponent->GetBestHostileActor();
918 }
919 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetBestHostileActor Failed in Custom AI Character"));}
920 return nullptr;
921}

◆ GetCanPerformTakedown()

bool ACustomAICharacter::GetCanPerformTakedown ( const float Damage) const
overridevirtual

Implements IStealthInterface.

460{
461 //@TODO fill
462 if(CharacterTraitsComponent != nullptr)
463 {
464
465 }
466 if(CharacterHealthComponent != nullptr)
467 {
468 if(CharacterHealthComponent->GetIsKnockedOut())
469 {
470 return false;
471 }
472 }
473 if(GetIsDead()){return false;}
475 {
476 return false;
477 }
479 {
480 return false;
481 }
482 return true;
483}
EALSMovementState GetMovementState() const
Definition ALSBaseCharacter.h:99
virtual bool GetIsDead() const override
Definition CustomCharacterBase.h:54

◆ GetCharacterFaction()

EFactionType ACustomAICharacter::GetCharacterFaction ( ) const
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

581{
582 if(CharacterTraitsComponent != nullptr)
583 {
584 return CharacterTraitsComponent->GetFaction();
585 }
586 return Super::GetCharacterFaction();
587}

◆ GetCompanionData()

FCompanionData ACustomAICharacter::GetCompanionData ( const bool bValue)
overridevirtual

Implements ICompanionInterface.

1010{
1011 FCompanionData CompanionData;
1012 if(CharacterHealthComponent != nullptr)
1013 {
1014 CompanionData.Health = CharacterHealthComponent->GetHealth();
1015 CompanionData.MaxHealth = CharacterHealthComponent->GetMaxHealth();
1016 CompanionData.Shield = CharacterHealthComponent->GetShieldHealth();
1017 CompanionData.MaxShield = CharacterHealthComponent->GetMaxShieldHealth();
1018 CompanionData.bHasShield = CharacterHealthComponent->bHasShield;
1019 }
1020 //@TODO CompanionData.Trust;
1021 //Get Trust from AITraits
1022 return CompanionData;
1023}
Definition CompanionDataTypes.h:27
float MaxHealth
Definition CompanionDataTypes.h:45
float Shield
Definition CompanionDataTypes.h:49
float Health
Definition CompanionDataTypes.h:43
bool bHasShield
Definition CompanionDataTypes.h:47
float MaxShield
Definition CompanionDataTypes.h:51

◆ GetHasWeapon()

bool ACustomAICharacter::GetHasWeapon ( ) const
overridevirtual

Returns if has a weapon

Implements IAIActionsInterface.

736{
737 if(CharacterShootingComponent != nullptr)
738 {
739 return CharacterShootingComponent->GetPlayerWeaponState().bHasGun;
740 }
741 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetHasWeapon Action Failed in Custom AI Character"));}
742 return false;
743}

◆ GetHostileActors()

TArray< AActor * > ACustomAICharacter::GetHostileActors ( ) const
overridevirtual

Implements IAIActionsInterface.

885{
886 if(CharacterTraitsComponent != nullptr)
887 {
888 return CharacterTraitsComponent->GetHostileActors();
889 }
890 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetHostileActors Failed in Custom AI Character"));}
891 TArray<AActor*> Empty;
892 return Empty;
893}

◆ GetInteractionData()

virtual FInteractionData ACustomAICharacter::GetInteractionData ( ) const
overrideprotectedvirtual

◆ GetIsReadyToCommand()

bool ACustomAICharacter::GetIsReadyToCommand ( ) const
overridevirtual

Implements ICompanionInterface.

1031{
1032 if(CompanionComponent != nullptr)
1033 {
1034 return CompanionComponent->GetIsReadyToCommand();
1035 }
1036 return false;
1037}

◆ GetLastKnownLocation()

FVector ACustomAICharacter::GetLastKnownLocation ( AActor * TargetActor,
const TArray< EAISense > & Senses )
overridevirtual

Implements IAIActionsInterface.

934{
935 UE_LOG(LogCustomCharacters,Error,TEXT("GetLastKnownLocation Should be called on Controller NOT Character"));
936 IAIActionsInterface* ActionsInterface = Cast<IAIActionsInterface>(GetController());
937 if(ActionsInterface != nullptr)
938 {
939 return ActionsInterface->GetLastKnownLocation(TargetActor, Senses);
940 }
941 return FVector::ZeroVector;
942}
Definition AIActionsInterface.h:20
virtual FVector GetLastKnownLocation(AActor *TargetActor, const TArray< EAISense > &Senses)=0

◆ GetMaxHealth()

float ACustomAICharacter::GetMaxHealth ( ) const
overridevirtual

Implements IAIActionsInterface.

924{
925 if(CharacterHealthComponent != nullptr)
926 {
927 return CharacterHealthComponent->GetMaxHealth();
928 }
929 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetMaxHealth Failed in Custom AI Character"));}
930 return 0.0f;
931}

◆ GetPerceivedObjects()

TArray< AActor * > ACustomAICharacter::GetPerceivedObjects ( TArray< EAIStimuliType > Filters) const
overridevirtual

Implements IAIActionsInterface.

907{
908 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetPerceivedObjects Should be Called TO AI CONTROLLER"));}
909 TArray<AActor*> Empty;
910 return Empty;
911}

◆ GetTraitsComponent()

class UAITraitsComponent * ACustomAICharacter::GetTraitsComponent ( ) const
inline

◆ GetUpFromFall()

void ACustomAICharacter::GetUpFromFall ( )
overrideprotectedvirtual

Reimplemented from ACharacterBase.

1076{
1077 Super::GetUpFromFall();
1078 if(BlackboardComponent != nullptr)
1079 {
1080 // BlackboardComponent->SetValueAsBool(FName("bKnockedOut"), false);
1081 }
1082 if(MeleeComponent != nullptr)
1083 {
1084 MeleeComponent->StopMeleeAttack();
1085 MeleeComponent->SetCanAttack(true);
1086 }
1087
1088}

◆ GetWeaponFireMode()

uint8 ACustomAICharacter::GetWeaponFireMode ( ) const
overridevirtual

Returns Weapon Fire Mode
0 - Single
1 - Burst
2 - FullAuto
3 - Charge

Implements IAIActionsInterface.

746{
747 if(CharacterShootingComponent != nullptr)
748 {
749 return static_cast<uint8>(CharacterShootingComponent->GetWeaponFireMode());
750 }
751 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetWeaponFireMode Action Failed in Custom AI Character"));}
752 return 0;
753}

◆ GetWeaponFireRate()

float ACustomAICharacter::GetWeaponFireRate ( ) const
overridevirtual

Return Weapon Fire Rate per Min

Implements IAIActionsInterface.

756{
757 if(CharacterShootingComponent != nullptr && CharacterShootingComponent->GetWeaponStats().IsValid())
758 {
759 return CharacterShootingComponent->GetWeaponStats().FireRate;
760 }
761 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("GetWeaponFireRate Action Failed in Custom AI Character"));}
762 return 10.0f;
763}

◆ GrabObject()

void ACustomAICharacter::GrabObject ( )
overridevirtual

Implements ICompanionInterface.

997{
998 if(CompanionComponent != nullptr)
999 {
1000 CompanionComponent->GrabObject();
1001 }
1002}

◆ HitMarker()

void ACustomAICharacter::HitMarker ( const AActor * ActorHit,
const float Damage,
const UDamageType * DamageType,
const FName HitBone,
const FVector HitLocation,
const bool bKillingHit = false,
const bool bInjuredPart = false )
overridevirtual

Implements IHitMarkerInterface.

73{
74 //- For Knowing When the AI has killed someone //
75 if(CharacterTraitsComponent != nullptr)
76 {
77 CharacterTraitsComponent->DamagedActor(const_cast<AActor*>(ActorHit), Damage);
78 //@TODO Add more Info about if shots are landing etc.
79 if(bKillingHit)
80 {
81 CharacterTraitsComponent->KilledActor(const_cast<AActor*>(ActorHit));
82 }
83 }
84}

◆ Interact()

void ACustomAICharacter::Interact ( AActor * TargetActor)
overridevirtual

Implements ICompanionInterface.

969{
970 if(CompanionComponent != nullptr)
971 {
972 CompanionComponent->Interact(TargetActor);
973 }
974}

◆ JumpOverObstacle()

void ACustomAICharacter::JumpOverObstacle ( )
protected
181{
182 TRACE_CPUPROFILER_EVENT_SCOPE(ACustomAICharacter::JumpOverObstacle);
183
184 JumpAction(true);
185 if(MantleComponentReference != nullptr)
186 {
187 const FALSMantleTraceSettings TraceSettings;
188 EDrawDebugTrace::Type DebugType = EDrawDebugTrace::None;
189 if(bDebuggingMode){DebugType = EDrawDebugTrace::ForDuration;}
190 MantleComponentReference->MantleCheck(TraceSettings, DebugType);
191 }
192}
class UALSMantleComponent * MantleComponentReference
Definition CustomCharacterBase.h:220
virtual void JumpAction(bool bValue) override
Definition CustomCharacterBase.cpp:918
bool MantleCheck(const FALSMantleTraceSettings &TraceSettings, EDrawDebugTrace::Type DebugType)
Definition ALSMantleComponent.cpp:176
Definition ALSCharacterStructLibrary.h:155

◆ MeleeAttack()

float ACustomAICharacter::MeleeAttack ( )
overridevirtual

Implements IAIActionsInterface.

843{
844 bool bHoldingWeapon = false;
845 if(CharacterShootingComponent != nullptr)
846 {
847 bHoldingWeapon = CharacterShootingComponent->GetPlayerWeaponState().bHasGun;
848 }
849 if(MeleeComponent != nullptr)
850 {
851 //@ TODO Check AI Melee
853 {
855 }
856 // FirePressedAction();
857 MeleeComponent->MeleeAttack(bHoldingWeapon);
858 return MeleeComponent->GetLastAnimationDuration();
859 }
860 return 0.0f;
861}
void SetOverlayState(EALSOverlayState NewState, bool bForce=false)
Definition ALSBaseCharacter.cpp:587
EALSOverlayState GetOverlayState() const
Definition ALSBaseCharacter.h:159

◆ NotifyHit()

void ACustomAICharacter::NotifyHit ( UPrimitiveComponent * MyComp,
AActor * Other,
UPrimitiveComponent * OtherComp,
bool bSelfMoved,
FVector HitLocation,
FVector HitNormal,
FVector NormalImpulse,
const FHitResult & Hit )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1041{
1042 Super::NotifyHit(MyComp, Other, OtherComp, bSelfMoved, HitLocation, HitNormal, NormalImpulse, Hit);
1043
1044 if(Other == nullptr){return;}
1045 const IBaseInterface* BaseActor = Cast<IBaseInterface>(Other);
1046 if(BaseActor == nullptr){return;}
1047 if(BaseActor->GetIsCharacter())
1048 {
1049 UAIBPLib::ReportTouchEvent(this, Other, HitLocation);
1050 }
1051 if(CharacterTraitsComponent != nullptr)
1052 {
1053 if(CharacterTraitsComponent->GetCharacterEmotions().AggressiveLevel > 20.0f && bCanBePushed == true)
1054 {
1055 bCanBePushed = false;
1056 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("AI IS ANGRY, NO PUSHING OVER : ACustomAICharacter::NotifyHit"));}
1057 }
1058 }
1059}
static void ReportTouchEvent(AActor *InTouchReceiver, AActor *InOtherActor, const FVector &EventLocation)
Definition AIBPLib.cpp:406

◆ OnDeath()

void ACustomAICharacter::OnDeath ( AActor * OwningActor,
const EDeathType DeathType,
AActor * DeathCauser,
AController * DeathInstigator )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

Reimplemented in ACampaignAICharacter.

1388{
1389 Super::OnDeath(OwningActor, DeathType, DeathCauser, DeathInstigator);
1390 if(CharacterShootingComponent != nullptr)
1391 {
1392 CharacterShootingComponent->OwnerDeath();
1393 }
1394 if(OptimizationComponent != nullptr)
1395 {
1396 OptimizationComponent->DisableAllOptimizations();
1397 }
1398 if(CompanionComponent != nullptr)
1399 {
1400 // CompanionComponent->OwnerDeath();
1401 }
1402 if(CharacterTraitsComponent != nullptr)
1403 {
1404 //@TODO
1405 //CharacterTraitsComponent->GetWasStealthKill();
1406 CharacterTraitsComponent->OwnerDeath();
1407 CharacterTraitsComponent->DestroyComponent();
1408 }
1409 if(BlackboardComponent != nullptr)
1410 {
1411 BlackboardComponent->SetValueAsBool(FName("bDead"), true);
1412 if(DeathType == EDeathType::Zombie)
1413 {
1414 BlackboardComponent->SetValueAsBool(FName("bZombie"), true);
1415 }
1416 else
1417 {
1418
1419 }
1420 }
1421 if(StealthTakedownCollision != nullptr)
1422 {
1423 StealthTakedownCollision->DestroyComponent();
1424 }
1425}

◆ OnDeathReplicated()

void ACustomAICharacter::OnDeathReplicated ( )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1428{
1429 Super::OnDeathReplicated();
1430 if(StealthTakedownCollision != nullptr)
1431 {
1432 StealthTakedownCollision->DestroyComponent();
1433 }
1434 if(CharacterShootingComponent != nullptr)
1435 {
1436 CharacterShootingComponent->OwnerDeath();
1437 }
1438 if(BlackboardComponent != nullptr)
1439 {
1440 BlackboardComponent->SetValueAsBool(FName("bDead"), true);
1441 // if(DeathType == EDeathType::Zombie)
1442 // {
1443 // BlackboardComponent->SetValueAsBool(FName("bZombie"), true);
1444 // }
1445 }
1446}

◆ OnFullDamageHit()

void ACustomAICharacter::OnFullDamageHit ( AController * InstigatedBy,
const float TotalDamage,
const UDamageType * DamageType,
const FName & HitBone,
const FVector & HitLocation,
const bool bKillingHit,
const bool bInjuredPart )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1377{
1378 Super::OnFullDamageHit(InstigatedBy, TotalDamage, DamageType, HitBone, HitLocation, bKillingHit, bInjuredPart);
1379 // if(InstigatedBy == nullptr || InstigatedBy->GetPawn() == nullptr){return;}
1380 // if(CharacterTraitsComponent != nullptr)
1381 // {
1382 // CharacterTraitsComponent->DamagedTakenByActor(InstigatedBy->GetPawn(), TotalDamage);
1383 // }
1384}

◆ OnInjuredBodyPart()

void ACustomAICharacter::OnInjuredBodyPart ( const EBodyPartName InjuredBodyPart,
const FVector & HitLocation,
const TArray< FBodyPart > & AllBodyParts )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1283{
1284 Super::OnInjuredBodyPart(InjuredBodyPart, HitLocation, AllBodyParts);
1285 switch (InjuredBodyPart)
1286 {
1287 default:
1289 break;
1291 if(CharacterTraitsComponent != nullptr)
1292 {
1293 CharacterTraitsComponent->HeadInjury();
1294 }
1295 break;
1297 break;
1299 break;
1302 if(CharacterShootingComponent != nullptr)
1303 {
1304 if(CharacterShootingComponent->GetPlayerWeaponState().bHasGun)
1305 {
1306 CharacterShootingComponent->ThrowWeaponAction();
1307 }
1308 }
1309 break;
1311 // Max Speed Change
1312 break;
1314 // Max Speed Change
1315 break;
1316 }
1317}

◆ OnInteract()

virtual void ACustomAICharacter::OnInteract ( AActor * Caller,
const int32 SelectedInteraction )
overrideprotectedvirtual

◆ OnKnockedOut()

void ACustomAICharacter::OnKnockedOut ( const UDamageType * DamageType,
const float WaitTime )
overrideprotectedvirtual
1320{
1321 Super::OnKnockedOut(DamageType, WaitTime);
1322 if(CharacterShootingComponent != nullptr)
1323 {
1324 if(CharacterShootingComponent->GetPlayerWeaponState().bHasGun)
1325 {
1326 CharacterShootingComponent->ThrowWeaponAction();
1327 }
1328 }
1329 if(BlackboardComponent != nullptr)
1330 {
1331 BlackboardComponent->SetValueAsBool(FName("bKnockedOut"), true);
1332 BlackboardComponent->SetValueAsFloat(FName("WaitTime"), WaitTime);
1333 }
1334 if(StealthTakedownCollision != nullptr)
1335 {
1337 }
1338 if(CharacterTraitsComponent != nullptr)
1339 {
1340 CharacterTraitsComponent->SetIsKnockedOut(true, DamageType);
1341 // CharacterTraitsComponent->OnKno
1342 }
1343 if(MeleeComponent != nullptr)
1344 {
1345 MeleeComponent->StopMeleeAttack();
1346 MeleeComponent->SetCanAttack(false);
1347 }
1348
1349
1350}
void SetEnabled(const bool bEnable=true)
Definition StealthTakedownCollision.cpp:17

◆ OnOptimizationWaveChanged()

void ACustomAICharacter::OnOptimizationWaveChanged ( const EOptimizationWave NewWave)
protected

◆ OnOverlap()

virtual bool ACustomAICharacter::OnOverlap ( AActor * Caller)
overrideprotectedvirtual

◆ OnStealthTakedown()

void ACustomAICharacter::OnStealthTakedown ( )

◆ OnStealthTakedownCancelled()

void ACustomAICharacter::OnStealthTakedownCancelled ( )

◆ OnStealthTakedownComplete()

void ACustomAICharacter::OnStealthTakedownComplete ( )

◆ OnWakeUp()

void ACustomAICharacter::OnWakeUp ( )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1353{
1354 Super::OnWakeUp();
1355 if(BlackboardComponent != nullptr)
1356 {
1357 BlackboardComponent->SetValueAsBool(FName("bKnockedOut"), false);
1358 }
1359 if(StealthTakedownCollision != nullptr)
1360 {
1362 }
1363 if(CharacterTraitsComponent != nullptr)
1364 {
1365 CharacterTraitsComponent->SetIsKnockedOut(false, nullptr);
1366 }
1367 if(MeleeComponent != nullptr)
1368 {
1369 MeleeComponent->StopMeleeAttack();
1370 MeleeComponent->SetCanAttack(true);
1371 }
1372}

◆ OptimizationWaveChanged()

void ACustomAICharacter::OptimizationWaveChanged ( const EOptimizationWave NewWave)
protectedvirtual
492{
494 switch (NewWave)
495 {
496 default:
497 case EOptimizationWave::NoOptimization:
499 bCanBePushed = true;
500 if(AimAssistSphereComponent != nullptr)
501 {
502 AimAssistSphereComponent->SetSphereRadius(AimAssistSize);
503 }
504 if(FootstepsComponent != nullptr)
505 {
506 FootstepsComponent->SetActive(true);
507 }
508 break;
509 case EOptimizationWave::FirstWave:
511 bCanBePushed = true;
512 if(FootstepsComponent != nullptr)
513 {
514 FootstepsComponent->SetActive(true);
515 FootstepsComponent->bPlayVFX = false;
516 }
517 if(AimAssistSphereComponent != nullptr)
518 {
519 AimAssistSphereComponent->SetSphereRadius(AimAssistSize);
520 }
521 break;
522 case EOptimizationWave::SecondWave:
524 bCanBePushed = true;
525 bPushHitReaction = false;
526 bAddCharacterMovement = false;
527 if(FootstepsComponent != nullptr)
528 {
529 FootstepsComponent->SetActive(true);
530 FootstepsComponent->bPlayVFX = false;
531 }
532 if(AimAssistSphereComponent != nullptr)
533 {
535 }
536 break;
537 //- Can't really see, but in frame //
538 case EOptimizationWave::ThirdWave:
539 bShouldCheckForJumps = false;
540 bCanBePushed = false;
541 if(FootstepsComponent != nullptr)
542 {
543 FootstepsComponent->SetActive(false);
544 FootstepsComponent->bPlayVFX = false;
545 FootstepsComponent->bPlaySound = false;
546 }
547 if(AimAssistSphereComponent != nullptr)
548 {
550 }
551 break;
552 case EOptimizationWave::Invisible:
553 bShouldCheckForJumps = false;
554 bCanBePushed = false;
555 if(FootstepsComponent != nullptr)
556 {
557 FootstepsComponent->SetActive(false);
558 FootstepsComponent->bPlayVFX = false;
559 FootstepsComponent->bPlaySound = false;
560 }
561 if(AimAssistSphereComponent != nullptr)
562 {
563 AimAssistSphereComponent->SetSphereRadius(0.0f);
564 }
565 break;
566 }
567}
bool bPushHitReaction
Definition CharacterBase.h:169
bool bAddCharacterMovement
Definition CharacterBase.h:173
void OnOptimizationWaveChanged(const EOptimizationWave NewWave)
float AimAssistDistanceMultiplier
Definition CustomAICharacter.h:289
float AimAssistSize
Definition CustomAICharacter.h:286
class UFootstepFXHandler * FootstepsComponent
Definition CustomCharacterBase.h:206
class USphereComponent * AimAssistSphereComponent
Remove? use sphere trace instead //.
Definition CustomCharacterBase.h:210

◆ Pickup()

void ACustomAICharacter::Pickup ( AActor * TargetActor)
overridevirtual

Implements ICompanionInterface.

961{
962 if(CompanionComponent != nullptr)
963 {
964 CompanionComponent->Pickup(TargetActor);
965 }
966}

◆ PickupGunCheck()

bool ACustomAICharacter::PickupGunCheck ( const FWeaponData_T & In_WeaponData)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1102{
1103 if(!In_WeaponData.IsValid() || In_WeaponData.CurrentAmmo <= 0)
1104 {
1105 return false;
1106 }
1107 if(CharacterShootingComponent != nullptr)
1108 {
1109 return CharacterShootingComponent->CanPickupWeapon(In_WeaponData);
1110 }
1111 return false;
1112}
int32 CurrentAmmo
Definition WeaponStructs.h:880
bool IsValid() const
Definition WeaponStructs.h:896

◆ PickupGunEvent()

int32 ACustomAICharacter::PickupGunEvent ( const FWeaponData_T In_WeaponData)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1091{
1092 int32 RemainingAmmo = 0;
1093 if(CharacterShootingComponent != nullptr)
1094 {
1095 CharacterShootingComponent->PickupWeapon(In_WeaponData, RemainingAmmo);
1096 WeaponStateChanged(CharacterShootingComponent->GetPlayerWeaponState());
1097 }
1098 return RemainingAmmo;
1099}
virtual void WeaponStateChanged(const struct FPlayerWeaponState &PlayerWeaponState) override
Definition CustomAICharacter.cpp:1140

◆ PickupObject()

bool ACustomAICharacter::PickupObject ( const AActor * TargetObject)
overridevirtual

Implements IAIActionsInterface.

805{
806 if(InteractionComponent != nullptr && TargetObject != nullptr)
807 {
808 InteractionComponent->SetActive(true);
809 FVector TargetLocation = TargetObject->GetActorLocation();
810 const IInteractionInterface* TargetInteractable = Cast<IInteractionInterface>(TargetObject);
811 if(TargetInteractable != nullptr)
812 {
813 TargetLocation = TargetInteractable->GetInteractionLocation();
814 }
815 const FHitResult Hit = InteractionComponent->TraceTowardLocation(TargetLocation);
816 if(Hit.GetActor() != nullptr)
817 {
818 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("Pickup Object: HitActor: %s"), *Hit.GetActor()->GetName());}
819 if(Hit.GetActor() == TargetObject)
820 {
821 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("Hit.GetActor() == TargetObject"));}
822 IInteractionInterface* Interactable = Cast<IInteractionInterface>(Hit.GetActor());
823 if(Interactable == nullptr){return false;}
824 Interactable->OnInteract(this);
825 //@TODO Check if success //
826 if(CompanionComponent != nullptr)
827 {
828 CompanionComponent->ObjectInteractedWith(true);
829 }
830 InteractionComponent->SetActive(false);
831 return true;
832 }
833 }
834 InteractionComponent->SetActive(false);
835 return false;
836 }
837 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("PickupObject Action Failed in Custom AI Character"));}
838 InteractionComponent->SetActive(false);
839 return false;
840}
class UInteractionComponent * InteractionComponent
Definition InteractableCharacter.h:56
virtual FVector GetInteractionLocation() const =0

◆ PlayAnimationMontage()

float ACustomAICharacter::PlayAnimationMontage ( UAnimMontage * Montage,
const float PlayRate = 1.0f,
const float InTimeToStartMontageAt = 0.0f,
const bool bStopAllMontages = true )
overridevirtual

Implements IAIActionsInterface.

864{
865 if(GetMesh() != nullptr && GetMesh()->GetAnimInstance() != nullptr)
866 {
867 return GetMesh()->GetAnimInstance()->Montage_Play(Montage, PlayRate, EMontagePlayReturnType::Duration, InTimeToStartMontageAt, bStopAllMontages);
868 }
869 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("PlayAnimMontage Failed in Custom AI Character"));}
870 return 0.0f;
871}

◆ PredictLocation()

FVector ACustomAICharacter::PredictLocation ( AActor * TargetActor)
overridevirtual

Implements IAIActionsInterface.

874{
875 UE_LOG(LogCustomCharacters,Error,TEXT("PredictLocation Should be called on Controller NOT Character"));
876 IAIActionsInterface* ActionsInterface = Cast<IAIActionsInterface>(GetController());
877 if(ActionsInterface != nullptr)
878 {
879 return ActionsInterface->PredictLocation(TargetActor);
880 }
881 return FVector::ZeroVector;
882}
virtual FVector PredictLocation(AActor *TargetActor)=0

◆ RagdollEnd()

void ACustomAICharacter::RagdollEnd ( )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

613{
614 TRACE_CPUPROFILER_EVENT_SCOPE(ACustomAICharacter::RagdollEnd);
615
616 Super::RagdollEnd();
617 if(CharacterTraitsComponent != nullptr)
618 {
619 CharacterTraitsComponent->SetCanDetect(true);
620 }
621 if(MeleeComponent != nullptr)
622 {
623 MeleeComponent->SetCanAttack(true);
624 }
625 if(CharacterShootingComponent != nullptr && CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered)
626 {
627 CharacterShootingComponent->HolsterWeapon();
628 }
629
630 // if(OptimizationComponent != nullptr)
631 // {
632 // OptimizationComponent->EnableOptimizations();
633 // }
634}
virtual void RagdollEnd() override
Definition CustomAICharacter.cpp:612

◆ RagdollStart()

void ACustomAICharacter::RagdollStart ( )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

590{
591 TRACE_CPUPROFILER_EVENT_SCOPE(ACustomAICharacter::RagdollStart);
592
593 Super::RagdollStart();
594 if(CharacterTraitsComponent != nullptr)
595 {
596 CharacterTraitsComponent->SetCanDetect(false);
597 }
598 if(MeleeComponent != nullptr)
599 {
600 MeleeComponent->SetCanAttack(false);
601 }
602 if(CharacterShootingComponent != nullptr && !CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered)
603 {
604 CharacterShootingComponent->HolsterWeapon();
605 }
606 // if(OptimizationComponent != nullptr)
607 // {
608 // OptimizationComponent->DisableAllOptimizations();
609 // }
610}
virtual void RagdollStart() override
Definition CustomAICharacter.cpp:589

◆ ReceiveEndFocus_Implementation()

void ACustomAICharacter::ReceiveEndFocus_Implementation ( AActor * Caller)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1277{
1278 Super::ReceiveEndFocus_Implementation(Caller);
1279}

◆ ReceiveOnInteract_Implementation()

void ACustomAICharacter::ReceiveOnInteract_Implementation ( AActor * Caller,
const EInteractionType InteractionType )
overrideprotectedvirtual
1267{
1268 Super::ReceiveOnInteract_Implementation(Caller, InteractionType);
1269}

◆ ReceiveStartFocus_Implementation()

void ACustomAICharacter::ReceiveStartFocus_Implementation ( AActor * Caller)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1272{
1273 Super::ReceiveStartFocus_Implementation(Caller);
1274}

◆ Reload()

float ACustomAICharacter::Reload ( )
overridevirtual

Implements IAIActionsInterface.

641{
642 if(CharacterShootingComponent != nullptr)
643 {
645 return CharacterShootingComponent->GetLastReloadTime();
646 }
647 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("Reload Action Failed in Custom AI Character"));}
648 return 0.0f;
649}

◆ SetCanSprint()

virtual void ACustomAICharacter::SetCanSprint ( const bool CanSprint)
inlinevirtual
virtual bool CanSprint() const override
Definition CustomAICharacter.h:228

◆ SetHandsTied()

void ACustomAICharacter::SetHandsTied ( const bool bValue)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1166{
1167 if(bValue)
1168 {
1169 if(CharacterShootingComponent != nullptr)
1170 {
1171 //@TODO Proper logic for Hostering, because this is just a toggle, and character might have weapon Hostered
1172 if(CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered == false)
1173 {
1174 CharacterShootingComponent->HolsterWeapon();
1175 }
1176 CharacterShootingComponent->SetActive(false);
1177 }
1178 if(MeleeComponent != nullptr)
1179 {
1180 MeleeComponent->SetActive(false);
1181 }
1182 if(InteractionComponent != nullptr)
1183 {
1184 InteractionComponent->SetActive(false);
1185 }
1186 if(CharacterTraitsComponent != nullptr)
1187 {
1188 CharacterTraitsComponent->SetCanDetect(false);
1189 }
1190 //- Call Super after, as Holster sets Overlay state to default //
1191 Super::SetHandsTied(bValue);
1192 }
1193 else
1194 {
1195 //- Call Super before so Holster can set the Overlay state //
1196 Super::SetHandsTied(bValue);
1197 if(CharacterShootingComponent != nullptr)
1198 {
1199 if(CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered)
1200 {
1201 CharacterShootingComponent->HolsterWeapon();
1202 }
1203 CharacterShootingComponent->SetActive(true);
1204 }
1205 if(MeleeComponent != nullptr)
1206 {
1207 MeleeComponent->SetActive(true);
1208 }
1209 if(InteractionComponent != nullptr)
1210 {
1211 InteractionComponent->SetActive(true);
1212 }
1213 if(CharacterTraitsComponent != nullptr)
1214 {
1215 CharacterTraitsComponent->SetCanDetect(true);
1216 }
1217 }
1218}

◆ SetMaster()

void ACustomAICharacter::SetMaster ( AActor * MasterActor)
overridevirtual

Implements ICompanionInterface.

945{
946 if(CompanionComponent != nullptr)
947 {
948 CompanionComponent->SetMaster(MasterActor);
949 }
950}

◆ SetupComponents()

void ACustomAICharacter::SetupComponents ( AController * ControllerReference = nullptr,
AActor * HUDReference = nullptr,
bool bIsLocallyControlled = false )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

Reimplemented in ACampaignAICharacter.

197{
198 AController* ControllerToPass = Controller;
199 if(ControllerReference != nullptr){ControllerToPass = ControllerReference;}
200 Super::SetupComponents(ControllerToPass, HUDReference);
201 if(CompanionComponent != nullptr)
202 {
203 CompanionComponent->SetupComponent(GetMesh(), GetMesh()->GetAnimInstance(), ControllerToPass, HUDReference, bIsNPC, bIsDead);
204 CompanionComponent->SetupBlackboard();
205 }
206 if(CharacterShootingComponent != nullptr)
207 {
208 CharacterShootingComponent->SetupComponent(GetMesh(), GetMesh()->GetAnimInstance(), ControllerToPass,HUDReference, bIsNPC, bIsDead);
210 // CharacterShootingComponent->SetupWeapon(CurrentWeapon);
211 CharacterShootingComponent->SetThrowStrength(ThrowStrength);
212 CharacterShootingComponent->OnWeaponStateChanged.AddUniqueDynamic(this, &ACustomCharacterBase::WeaponStateChanged);
213 CharacterShootingComponent->OnWeaponEquipped.AddUniqueDynamic(this, &ACustomCharacterBase::WeaponEquipped);
214
215 }
216 if(CharacterTraitsComponent != nullptr)
217 {
218 CharacterTraitsComponent->SetupComponent(GetMesh(), GetMesh()->GetAnimInstance(), ControllerToPass, HUDReference, bIsNPC, bIsDead);
219 CharacterTraitsComponent->SetupComponentWidgets();
220 CharacterTraitsComponent->OnAIStateChangedDelegate.AddUniqueDynamic(this, &ACustomAICharacter::AIStateChanged);
221 AIStateChanged(CharacterTraitsComponent->GetCurrentAIState());
222 if(MeleeComponent != nullptr)
223 {
224 MeleeComponent->OnRequestFriendlyActors.AddUniqueDynamic(CharacterTraitsComponent, &UAITraitsComponent::RequestFriendlyActors);
225 }
226 }
227}
virtual void AIStateChanged(EAIStateType State)
Definition CustomAICharacter.cpp:569
float ThrowStrength
Definition CustomCharacterBase.h:326
bool bIsDead
Definition CustomCharacterBase.h:385
USceneComponent * ThrowPoint
Definition InteractableCharacter.h:54

◆ SetupPlayerInputComponent()

void ACustomAICharacter::SetupPlayerInputComponent ( class UInputComponent * PlayerInputComponent)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1161{
1162 Super::SetupPlayerInputComponent(PlayerInputComponent);
1163}

◆ ShootAction()

void ACustomAICharacter::ShootAction ( const bool bStartShooting = true)
overridevirtual

Implements IAIActionsInterface.

687{
688 if(CharacterShootingComponent != nullptr)
689 {
690 if(CharacterTraitsComponent != nullptr)
691 {
692 CharacterShootingComponent->SetAccuracy(CharacterTraitsComponent->GetAccuracy());
693 }
694 if(bStartShooting)
695 {
696 if(!CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered && CharacterShootingComponent->GetPlayerWeaponState().bHasGun)
697 {
698 CharacterShootingComponent->ShootGun();
699 }
700 }
701 else
702 {
703 CharacterShootingComponent->StopShootGun();
704 }
705 return;
706 }
707 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("Shoot Action Failed in Custom AI Character"));}
708}

◆ ShootAtTargetAction()

void ACustomAICharacter::ShootAtTargetAction ( const bool bStartShooting = true,
const FVector & TargetLocation = FVector::ZeroVector )
overridevirtual

Implements IAIActionsInterface.

711{
712 if(CharacterShootingComponent != nullptr)
713 {
714 CharacterShootingComponent->SetTargetLocation(TargetLocation);
715 ShootAction(bStartShooting);
716 return;
717 }
718 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Error, TEXT("ShootAtTargetAction Action Failed in Custom AI Character"));}
719}
virtual void ShootAction(const bool bStartShooting=true) override
Definition CustomAICharacter.cpp:686

◆ ShowStealthPrompt()

void ACustomAICharacter::ShowStealthPrompt ( const bool bShow = true)
overridevirtual

Implements IStealthInterface.

486{
487 InteractionData.SetInteractionHidden(EInteractionType::Takedown, !bShow);
488 InteractionData.SetInteractionHidden(EInteractionType::KnockOut, !bShow);
489}

◆ StartCombat()

void ACustomAICharacter::StartCombat ( AActor * TargetEnemy)
overridevirtual

Implements ICompanionInterface.

977{
978 if(CompanionComponent != nullptr)
979 {
980 CompanionComponent->StartCombat(TargetEnemy);
981 }
982 if(CharacterTraitsComponent != nullptr)
983 {
984 CharacterTraitsComponent->SetCompanionTargetEnemy(TargetEnemy);
985 }
986}

◆ StartFocus()

virtual void ACustomAICharacter::StartFocus ( )
overrideprotectedvirtual

◆ StealthTakedown()

void ACustomAICharacter::StealthTakedown ( AActor * Attacker,
const int32 AnimationIndex )
overridevirtual

Implements IStealthInterface.

320{
321 bGettingTakedown = true;
322 bCanBePushed = false;
323 if(MeleeComponent != nullptr)
324 {
325 MeleeComponent->SetCanAttack(false);
326 }
327 //? Have to Disable the whole actor collision, don't know why, Causes lots of overlap problems if not //
328 SetActorEnableCollision(false);
330 // if(GetALSMovementComponent() != nullptr)
331 // {
332 // GetALSMovementComponent()->DisableMovement();
333 // }
334 if(GetCapsuleComponent() != nullptr)
335 {
336 GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
337 }
338 if(GetMesh() != nullptr)
339 {
340 GetMesh()->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
341 }
342 if(GetCustomMesh() != nullptr)
343 {
344 GetCustomMesh()->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
345 }
346 //- Pause Blackboard //
347 //@TODO Check if needed
348 if(BlackboardComponent != nullptr)
349 {
350 BlackboardComponent->PauseObserverNotifications();
351 // BlackboardComponent->DestroyComponent();
352 }
353 const AAIController* AIController = Cast<AAIController>(GetController());
354 if(GetController() != nullptr && AIController != nullptr && AIController->BrainComponent != nullptr)
355 {
356 AIController->BrainComponent->StopLogic("Takedown");
357 }
358 if(MotionWarping != nullptr && bStealthMotionWarp)
359 {
360 FVector ForwardVectorMultiply = Attacker->GetActorRotation().Vector() * StealthActorForward;
361 ForwardVectorMultiply.Z = StealthActorZ;
362 const FVector RightVectorMultiply = (UKismetMathLibrary::GetRightVector(Attacker->GetActorRotation()) * StealthActorRight);
363
364 const FVector TargetLocation = (Attacker->GetActorLocation() - ForwardVectorMultiply) - RightVectorMultiply;
365
366 // const ICharacterInterface* CharacterAttacker = Cast<ICharacterInterface>(Attacker);
367 ICharacterBaseInterface* CharacterAttacker = Cast<ICharacterBaseInterface>(Attacker);
368 if(bStealthMotionWarpFromComponent && CharacterAttacker != nullptr)
369 {
370 MotionWarping->AddOrUpdateWarpTargetFromComponent(StealthTakedownName, CharacterAttacker->GetCharacterMesh(), StealthMotionWarpBoneName, bStealthMotionWarpFollowComponent);
371 }
372 else
373 {
374 MotionWarping->AddOrUpdateWarpTargetFromLocationAndRotation(StealthTakedownName, TargetLocation, Attacker->GetActorRotation());
375 }
376
377 }
378
379 //- @TODO Change Collision of some things so character doesn't perform any actions, fall over, etc.
380 if(StealthTakedownAnims.IsValidIndex(AnimationIndex))
381 {
382 const float AnimationTime = PlayAnimMontage(StealthTakedownAnims[AnimationIndex]);
383 }
384
385
386}
bool bStealthMotionWarp
Definition CustomAICharacter.h:142
bool bStealthMotionWarpFollowComponent
Definition CustomAICharacter.h:148
float StealthActorForward
Definition CustomAICharacter.h:153
FName StealthMotionWarpBoneName
Definition CustomAICharacter.h:146
bool bStealthMotionWarpFromComponent
Definition CustomAICharacter.h:144
float StealthActorZ
Definition CustomAICharacter.h:155
float StealthActorRight
Definition CustomAICharacter.h:157
TArray< UAnimMontage * > StealthTakedownAnims
Definition CustomAICharacter.h:165
Definition CustomCharacter.h:19
virtual USkeletalMeshComponent * GetCharacterMesh() const =0

◆ StealthTakedownComplete()

void ACustomAICharacter::StealthTakedownComplete ( )
overridevirtual

Implements IStealthInterface.

415{
416 SetActorEnableCollision(true);
417 if(MotionWarping)
418 {
419 MotionWarping->RemoveWarpTarget(StealthTakedownName);
420 }
421 // if(GetALSMovementComponent() != nullptr)
422 // {
423 // GetALSMovementComponent()->Enable();
424 // }
425 // if(GetCapsuleComponent() != nullptr)
426 // {
427 // GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
428 // }
429 if(GetMesh() != nullptr)
430 {
431 GetMesh()->SetCollisionResponseToAllChannels(ECR_Block);
432 GetMesh()->SetCollisionResponseToChannel(ECC_Pawn, ECR_Ignore);
433 }
434 // if(GetCustomMesh() != nullptr)
435 // {
436 // GetCustomMesh()->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
437 // }
438
439 const AAIController* AIController = Cast<AAIController>(GetController());
440 if(GetController() != nullptr && AIController != nullptr && AIController->BrainComponent != nullptr)
441 {
442 AIController->BrainComponent->StartLogic();
443 }
444
445 if(BlackboardComponent != nullptr)
446 {
447 BlackboardComponent->ResumeObserverNotifications(false);
448 }
449 if(MeleeComponent != nullptr)
450 {
451 MeleeComponent->SetCanAttack(true);
452 }
453 bGettingTakedown = false;
454 ShowStealthPrompt(false);
456 if(bDebuggingMode){UE_LOG(LogCustomCharacters, Warning, TEXT("AI: Takedown Complete"));}
457}
void OnStealthTakedownComplete()

◆ Tick()

void ACustomAICharacter::Tick ( const float DeltaTime)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

Reimplemented in ACampaignAICharacter.

1156{
1157 Super::Tick(DeltaTime);
1158}

◆ UpdateMovementSpeed()

void ACustomAICharacter::UpdateMovementSpeed ( const EAIMovementSpeed MovementSpeed = EAIMovementSpeed::Running,
const EAIMovementType MovementType = EAIMovementType::Normal )
overridevirtual

Implements IAIActionsInterface.

766{
767 switch (MovementType)
768 {
769 default:
771 MovementModel.RowName = FName("Normal");
772 break;
774 MovementModel.RowName = FName("Injured");
775 break;
777 MovementModel.RowName = FName("Responsive");
778 break;
780 MovementModel.RowName = FName("Sluggish");
781 break;
782 }
783 switch (MovementSpeed)
784 {
787 break;
788 default:
792 break;
795 break;
796 }
798 if(GetALSMovementComponent() != nullptr)
799 {
801 }
802}
FORCEINLINE class UALSCharacterMovementComponent * GetALSMovementComponent() const
Definition ALSBaseCharacter.h:45
FALSMovementSettings GetTargetMovementSettings() const
Definition ALSBaseCharacter.cpp:793
void SetMovementModel()
Definition ALSBaseCharacter.cpp:758
void SetDesiredGait(EALSGait NewGait)
Definition ALSBaseCharacter.cpp:474
FDataTableRowHandle MovementModel
Definition ALSBaseCharacter.h:543
void SetMovementSettings(FALSMovementSettings NewMovementSettings)
Definition ALSCharacterMovementComponent.cpp:253

◆ Wait()

void ACustomAICharacter::Wait ( const FVector & TargetLocation)
overridevirtual

Implements ICompanionInterface.

989{
990 if(CompanionComponent != nullptr)
991 {
992 CompanionComponent->Wait(TargetLocation);
993 }
994}

◆ WeaponEquipped()

void ACustomAICharacter::WeaponEquipped ( const TArray< FWeaponData_T > & Weapons,
const int32 CurrentWeaponIndex )
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1115{
1116 if(GetIsDead()){return;}
1117 Super::WeaponEquipped(Weapons, CurrentWeaponIndex);
1118 if(CharacterShootingComponent == nullptr){return;}
1119 if(CharacterShootingComponent->GetPlayerWeaponState().bIsHolstered){return;}
1120 if(Weapons.IsValidIndex(CurrentWeaponIndex))
1121 {
1122 bool bSuccess = false;
1123 const FWeaponStats_T WeaponStats = UWeaponBPLib::GetWeaponStats(this, Weapons[CurrentWeaponIndex].WeaponID, bSuccess);
1124 if(!bSuccess){UE_LOG(LogTemp,Error,TEXT("Get Weapon Stats Failed"));return;}
1125
1126 const EALSOverlayState WeaponOverlayState = UCharacterBPLib::WeaponStateToOverlayState(WeaponStats.WeaponOverlay);
1127 // if(!HasAuthority())
1128 // {
1129 //
1130 // }
1131 if(HasAuthority())
1132 {
1133 //@bug No owning connection (Server changed weapons, other clients can't do server function)
1134 Server_SetOverlayState(WeaponOverlayState, true);
1135 }
1136 SetOverlayState(WeaponOverlayState);
1137 }
1138}
EALSOverlayState
Definition ALSCharacterEnumLibrary.h:68
void Server_SetOverlayState(EALSOverlayState NewState, bool bForce)
static EALSOverlayState WeaponStateToOverlayState(EWeaponOverlay WeaponOverlay)
Definition CharacterBPLib.cpp:8
static FWeaponStats_T GetWeaponStats(const UObject *WorldContextObject, const FString &WeaponID, bool &bSuccess, UDataTable *DataTable=nullptr)
Definition WeaponBPLib.cpp:176
Represents statistics for a weapon.
Definition WeaponStructs.h:622
EWeaponOverlay WeaponOverlay
Definition WeaponStructs.h:633

◆ WeaponStateChanged()

void ACustomAICharacter::WeaponStateChanged ( const struct FPlayerWeaponState & PlayerWeaponState)
overrideprotectedvirtual

Reimplemented from ACustomCharacterBase.

1141{
1142 Super::WeaponStateChanged(PlayerWeaponState);
1143 if(BlackboardComponent == nullptr){return;}
1144 BlackboardComponent->SetValueAsBool(FName("bHasWeapon"), PlayerWeaponState.bHasGun);
1145 BlackboardComponent->SetValueAsBool(FName("bWeaponIsInAutoMode"), PlayerWeaponState.bIsWeaponInAutoMode);
1146 BlackboardComponent->SetValueAsBool(FName("bReloading"), PlayerWeaponState.bIsReloading);
1147 //@ TODO Weapon Modes
1148 // BlackboardComponent->SetValueAsBool(FName("bWeaponIsInAutoMode"), PlayerWeaponState.bIsWeaponInBurstMode);
1149 // BlackboardComponent->SetValueAsBool(FName("bWeaponIsInAutoMode"), PlayerWeaponState.bIsWeaponInSingleMode);
1150
1151
1152}
bool bHasGun
Definition WeaponStructs.h:130
bool bIsReloading
Definition WeaponStructs.h:122
bool bIsWeaponInAutoMode
Definition WeaponStructs.h:132

Member Data Documentation

◆ AimAssistDistanceMultiplier

float ACustomAICharacter::AimAssistDistanceMultiplier = 0.5f
protected

◆ AimAssistSize

float ACustomAICharacter::AimAssistSize = 160.0f
protected

◆ bCanSprint

bool ACustomAICharacter::bCanSprint = true
protected

◆ bGettingTakedown

bool ACustomAICharacter::bGettingTakedown = false
protected

◆ BlackboardComponent

UBlackboardComponent* ACustomAICharacter::BlackboardComponent
private

◆ bShouldCheckForDoors

bool ACustomAICharacter::bShouldCheckForDoors = true
protected

◆ bShouldCheckForJumps

bool ACustomAICharacter::bShouldCheckForJumps = true
protected

◆ bStealthMotionWarp

bool ACustomAICharacter::bStealthMotionWarp = true
protected

◆ bStealthMotionWarpFollowComponent

bool ACustomAICharacter::bStealthMotionWarpFollowComponent = true
protected

◆ bStealthMotionWarpFromComponent

bool ACustomAICharacter::bStealthMotionWarpFromComponent = true
protected

◆ CharacterShootingComponent

class UCharacterShootingComponent* ACustomAICharacter::CharacterShootingComponent
protected

◆ CharacterTraitsComponent

class UAITraitsComponent* ACustomAICharacter::CharacterTraitsComponent
protected

◆ CompanionComponent

class UCompanionComponent* ACustomAICharacter::CompanionComponent
protected

◆ JumpCheckFrequency

float ACustomAICharacter::JumpCheckFrequency = 1.0f
protected

◆ JumpCheckTimerHandle

FTimerHandle ACustomAICharacter::JumpCheckTimerHandle
private

◆ MotionWarping

class UMotionWarpingComponent* ACustomAICharacter::MotionWarping
protected

◆ OptimizationComponent

class UOptimizationProxyComponent* ACustomAICharacter::OptimizationComponent
protected

◆ SetupCompleteDelayTimerHandle

FTimerHandle ACustomAICharacter::SetupCompleteDelayTimerHandle
private

◆ SphereStartOffset

float ACustomAICharacter::SphereStartOffset = 65.0f
protected

◆ SphereTraceRadius

float ACustomAICharacter::SphereTraceRadius = 45.0f
protected

◆ StealthActorDistance

float ACustomAICharacter::StealthActorDistance = -175.0f
protected

◆ StealthActorForward

float ACustomAICharacter::StealthActorForward = 65.0f
protected

◆ StealthActorRight

float ACustomAICharacter::StealthActorRight = 20.0f
protected

◆ StealthActorZ

float ACustomAICharacter::StealthActorZ = 90.0f
protected

◆ StealthCurrentAttacker

AActor* ACustomAICharacter::StealthCurrentAttacker = nullptr
protected

◆ StealthMotionWarpBoneName

FName ACustomAICharacter::StealthMotionWarpBoneName = FName("root")
protected

◆ StealthTakedownAnims

TArray<UAnimMontage*> ACustomAICharacter::StealthTakedownAnims
protected

◆ StealthTakedownCollision

class UStealthTakedownCollision* ACustomAICharacter::StealthTakedownCollision
protected

◆ StealthTakedownName

FName ACustomAICharacter::StealthTakedownName = "Stealth_Attack_NonLethal_01"
protected

◆ VelocityAdditionalOffset

float ACustomAICharacter::VelocityAdditionalOffset = 25.0f
protected

◆ VelocityClampMax

float ACustomAICharacter::VelocityClampMax = 100.0f
protected

The documentation for this class was generated from the following files: