Compare commits

..

2 Commits

Author SHA1 Message Date
baz c474aa4405 Disable playing on damaged animation montage
This is intentional, I want to disable this until I find a better way to blend them in with the animation blueprint as well as slowing movement when hit.
2024-03-05 17:02:16 +00:00
baz 3c69fc2289 Move OnDamagedAnimationMontages to NakatomiCharacter 2024-03-05 17:00:53 +00:00
4 changed files with 10 additions and 11 deletions

View File

@ -275,6 +275,13 @@ void ANakatomiCharacter::PlayOnFireAnimations()
void ANakatomiCharacter::OnDamaged()
{
int32 randomAnimMontage = FMath::RandRange(0,OnDamagedHitAnimMontages.Num()-1);
if (OnDamagedHitAnimMontages[randomAnimMontage] != nullptr)
{
//TODO: Disable movement while playing animation montage
// PlayAnimMontage(OnDamagedHitAnimMontages[randomAnimMontage]);
}
}
void ANakatomiCharacter::OnDeath()

View File

@ -42,6 +42,9 @@ public:
UPROPERTY(EditDefaultsOnly)
UAnimMontage* FireWeaponAnimMontage;
UPROPERTY(EditDefaultsOnly)
TArray<UAnimMontage*> OnDamagedHitAnimMontages;
protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (AllowPrivateAccess = "true"))
UNakatomiCMC* NakatomiCMC;

View File

@ -460,14 +460,6 @@ void APlayerCharacter::PlayOnFireAnimations()
void APlayerCharacter::OnDamaged()
{
Super::OnDamaged();
int32 randomAnimMontage = FMath::RandRange(0,OnDamagedHitAnimMontages.Num()-1);
if (OnDamagedHitAnimMontages[randomAnimMontage] != nullptr)
{
//TODO: Disable movement while playing animation montage
PlayAnimMontage(OnDamagedHitAnimMontages[randomAnimMontage]);
}
}
void APlayerCharacter::OnDeath()

View File

@ -88,9 +88,6 @@ public:
UPROPERTY(EditDefaultsOnly)
UAnimMontage* ThrowExplosiveAnimMontage;
UPROPERTY(EditDefaultsOnly)
TArray<UAnimMontage*> OnDamagedHitAnimMontages;
UPROPERTY(EditDefaultsOnly)
UAnimMontage* FireWeaponADSAnimMontage;