youling Thank you for clarifying your situation. I think you may want to create a custom timer system in C++ that respects your character's Custom Time Dilation. I'm not a C++ expert, but the code suggested by chatGPT seems to write the following:
void AYourCharacter::StartAttackWithCustomTimer()
{
// Start the attack animation
PlayAttackAnimation();
// Calculate adjusted delay time based on Custom Time Dilation
float CustomTimeDilation = GetWorld()->GetWorldSettings()->TimeDilation * CustomTimeDilationValue;
float AdjustedTime = 1.0f / CustomTimeDilation;
// Set a custom timer
GetWorld()->GetTimerManager().SetTimer(
CustomTimerHandle,
this,
&AYourCharacter::OnCustomTimerElapsed,
AdjustedTime,
false
);
}
void AYourCharacter::OnCustomTimerElapsed()
{
// Execute the task
TriggerNextAction();
}
Although I am not sure if it will work perfectly in your case, I hope it will be of some help.