42 UFUNCTION(BlueprintPure, Category =
"Player")
45 virtual void NotifyHit(UPrimitiveComponent* MyComp, AActor*
Other, UPrimitiveComponent* OtherComp,
bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse,
const FHitResult&
Hit)
override;
49 UFUNCTION(BlueprintCallable, Category =
"Custom ALS")
51 UFUNCTION(BlueprintCallable, Category = "
Custom ALS")
52 virtual
EFactionType GetCharacterFaction() const override;
53 UFUNCTION(BlueprintCallable, Category = "
Custom ALS")
54 virtual
bool GetIsDead()
const override{
return bIsDead;};
55 UFUNCTION(BlueprintCallable, Category =
"Custom ALS")
56 virtual
void StartThreatIndication(AActor* PawnThreat) override;
57 UFUNCTION(BlueprintImplementableEvent, Category = "
Custom ALS")
58 void OnStartThreatIndication(AActor* PawnThreat);
59 UFUNCTION(BlueprintCallable, Category = "
Custom ALS")
60 virtual
void StopThreatIndication() override;
61 UFUNCTION(BlueprintImplementableEvent, Category = "
Custom ALS")
62 void OnStopThreatIndication();
63 UFUNCTION(BlueprintCallable, Category = "
Custom ALS")
64 virtual
void UpdateThreatIndication(const FVector&
Location, const
float DetectionAmount) override;
65 UFUNCTION(BlueprintImplementableEvent, Category = "
Custom ALS")
66 void OnUpdateThreatIndication(const FVector&
Location, const
float DetectionAmount);
69 UFUNCTION(BlueprintCallable, Category = "
Custom ALS")
70 virtual USkeletalMeshComponent* GetCharacterSecondaryMesh()
const override {
return GetCustomMesh();};
72 virtual void SetCharacterVehicleMode(
const EVehicleMode Mode)
override;
75 virtual bool GetCharacterHealth(
float&
Health,
float& MaxHealth)
const override;
77 UFUNCTION(BlueprintImplementableEvent, Category=
"Custom ALS")
81 UFUNCTION(BlueprintCallable, Category = "
Interaction")
82 virtual
void ForceWakeUp();
85 virtual
void ReceiveStartFocus_Implementation(AActor* Caller) override;
86 virtual
void ReceiveEndFocus_Implementation(AActor* Caller) override;
116 UFUNCTION(BlueprintCallable, Category = "
Base Helpers")
117 virtual
void SetGravityEnabled(const
bool bValue) override;
118 UFUNCTION(BlueprintCallable, Category = "
Interaction")
119 virtual FString GetObjectDisplayName()
const override {
return DisplayName;};
120 UFUNCTION(
Server, Reliable)
121 virtual
void DestroyActor(AActor* ActorToDestroy) override;
122 UFUNCTION(NetMulticast, Reliable)
123 virtual
void DestroyActorOnClient(AActor* ActorToDestroy) override;
124 UFUNCTION(BlueprintCallable, Category = "
Base Helpers")
125 virtual
bool GetIsCharacter()
const override {
return true;};
131 UFUNCTION(BlueprintCallable, Category =
"Interaction")
132 void SetPlayerName(FString Username){DisplayName = Username;};
135 UFUNCTION(BlueprintCallable, Category =
"Pickups")
136 virtual int32 PickupGunEvent(const
FWeaponData_T In_WeaponData) override;
137 UFUNCTION(BlueprintCallable, Category = "Pickups")
138 virtual
bool PickupGunCheck(const
FWeaponData_T& In_WeaponData) override;
139 UFUNCTION(BlueprintCallable, Category = "Pickups")
140 virtual
bool PickupAttachmentCheck(const
FWeaponAttachment& In_WeaponAttachmentData) override;
141 UFUNCTION(BlueprintCallable, Category = "Pickups")
142 virtual
void PickupAttachmentEvent(const FString& WeaponAttachmentID) override;
146 virtual
void WeaponEquipped(const TArray<
FWeaponData_T>& Weapons, const int32 CurrentWeaponIndex);
151 virtual
void ForwardMovementAction(
float Value) override;
152 virtual
void RightMovementAction(
float Value) override;
154 virtual
void RagdollStart() override;
155 virtual
void RagdollEnd() override;
156 virtual
void Landed(const FHitResult&
Hit) override;
157 virtual
EALSGait GetAllowedGait() const override;
158 virtual
bool CanSprint() const override;
159 virtual
void SprintAction(
bool bValue) override;
160 virtual
void JumpAction(
bool bValue) override;
161 virtual
bool CanJumpInternal_Implementation() const override;
162 virtual
void StanceAction() override;
163 virtual
void OnJumped_Implementation() override;
170 UFUNCTION(
Server, Reliable)
171 void Server_OnPawnSpawn();
173 virtual
void OnPawnSpawned() override;
175 UFUNCTION(BlueprintImplementableEvent, Category="Player", meta=(DisplayName = "On Pawn Spawn"))
176 void ReceiveOnPawnSpawn();
179 virtual
void BeginPlay() override;
180 virtual
void Tick(const
float DeltaTime) override;
181 virtual
void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
189 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Health")
190 class UCharacterHealthComponent* CharacterHealthComponent;
191 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Health")
192 class UHealthBarWidgetComponent* HealthBarComponent;
195 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="
Hit Reactions")
196 class UPhysicalAnimationComponent* PhysicalAnimationComponent;
201 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="
Hit Reactions")
203 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="
Melee")
204 class UMeleeComponent* MeleeComponent;
205 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Footsteps")
206 class UFootstepFXHandler* FootstepsComponent;
209 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Aim Assist")
210 class USphereComponent* AimAssistSphereComponent;
213 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Shooting")
214 class URecoilAnimationComponent* RecoilAnimationComponent;
219 UPROPERTY(BlueprintReadOnly, Category="Mantle")
221 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="
Custom ALS")
222 USkeletalMeshComponent* CustomSkeletalMesh;
228 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "
Custom ALS|Debugging")
229 float MultiplayerStartDelay = 0.5f;
233 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "
Custom ALS|
Character")
234 float FallDamageOffset = 550.0f;
236 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "
Custom ALS|
Character")
237 float FallDamageDivisor = 5.0f;
245 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "
Custom ALS")
247 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Name")
251 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS|Stamina")
252 bool bForceWalkWhileAiming = true;
258 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
259 bool bToggleSprint = true;
260 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS|Stamina")
261 bool bSprinting = true;
263 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
264 float SprintDeadZone = 0.5f;
266 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Flying")
267 float FlyingScaleValue = 1.0f;
268 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS|Flying")
269 bool bIsFlyingUp = false;
270 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS|Flying")
271 bool bIsFlyingDown = false;
273 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS|Stamina")
274 float Stamina = 100.0f;
276 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
277 float MinRequiredStamina = 0.2f;
278 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
279 float MaxStamina = 60.0f;
280 float MaxStaminaDefault = 60.0f;
281 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
282 float MaxPossibleStamina = 150.0f;
283 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
284 float MinStamina = 10.0f;
286 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
287 float StaminaDepletionRate = 0.05f;
288 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
289 float StaminaDepletionIncrement = 0.5f;
290 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
291 float StaminaRechargeRate = 0.05f;
292 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
293 float StaminaRechargeIncrement = 0.5f;
296 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
297 float StaminaRechargeDelayTime = 2.0f;
298 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Stamina")
299 float StaminaJumpAmount = 10.0f;
325 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS")
326 float ThrowStrength = 500.0f;
328 UFUNCTION(BlueprintCallable, Category="
Custom ALS")
329 bool GetHandsTied()
const {
return bHandsTied;}
330 UFUNCTION(BlueprintCallable, Category=
"Custom ALS")
331 virtual
void SetHandsTied(const
bool bValue = true);
332 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "
Custom ALS")
333 bool bHandsTied = false;
335 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS")
336 float AimAssistRadius = 160.0f;
337 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS")
338 float AimAssistShrinkTime = 3.0f;
342 virtual
void AimAssistOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, const int32 OtherBodyIndex, const
bool bFromSweep, const FHitResult& SweepResult);
343 UFUNCTION(BlueprintImplementableEvent, Category="Aim Assist")
344 void OnAimAssistOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, const int32 OtherBodyIndex, const
bool bFromSweep, const FHitResult& SweepResult);
346 virtual
void AimAssistRevertSize();
364 virtual
void OnHealthAndShieldChanged(
float Health,
float MaxHealth,
float ShieldHealth,
float MaxShieldHealth, const class UDamageType* DamageType);
366 virtual
void OnInjuredBodyPart(const
EBodyPartName InjuredBodyPart, const FVector& HitLocation, const TArray<
FBodyPart>& AllBodyParts);
368 virtual
void OnShieldBreak();
370 virtual
void OnKnockedOut(const class UDamageType* DamageType, const
float WaitTime);
372 virtual
void OnWakeUp();
374 virtual
void OnDeath(AActor* OwningActor, const
EDeathType DeathType, AActor* DeathCauser, AController* DeathInstigator);
376 virtual
void OnFullDamageHit(AController* InstigatedBy, const
float TotalDamage, const UDamageType* DamageType, const FName& HitBone, const FVector& HitLocation, const
bool bKillingHit, const
bool bInjuredPart);
378 FPlayerDeath GetPlayerDeathInfo(const
EDeathType DeathType, AActor* DeathCauser, const AController* DeathInstigator) const;
380 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Custom ALS")
381 USkeletalMeshComponent* GetCustomMesh()
const{
return CustomSkeletalMesh;}
384 UPROPERTY(ReplicatedUsing=OnDeathReplicated)
385 bool bIsDead = false;
388 virtual
void OnDeathReplicated();
390 virtual
void FirePressedAction();
391 virtual
void SetupComponents(AController* ControllerReference =
nullptr, AActor* HUDReference =
nullptr,
bool bIsLocallyControlled = false);
394 UFUNCTION(BlueprintCallable, Category = "Save Game")
395 virtual
void SaveGameData();
396 UFUNCTION(BlueprintCallable, Category = "Save Game")
397 virtual
void LoadGameData();
399 virtual
bool SaveCharacterData();
400 virtual
bool LoadCharacterData();
403 virtual
void LoadComponentsSaveData();
404 virtual
void SaveComponentsData();
408 virtual
void UpdateStaminaHUD();
410 virtual
void StopSprinting();
411 virtual
void RechargeStamina();
412 virtual
void SetMaxStamina(const
float AmountToAdd);
443 UPROPERTY(ReplicatedUsing=OnCharacterReadyReplicated, VisibleAnywhere, BlueprintReadOnly, Category="
Character|Replication")
444 bool bCharacterReady = false;
447 void OnCharacterReadyReplicated();
451 FTimerHandle StaminaTimerHandle;
452 FTimerHandle StaminaRechargeTimerHandle;
453 FTimerHandle FallOverTimerHandle;
454 FTimerHandle FlyingTimerHandle;
457 FTimerHandle AimAssistOverlapTimerHandle;