I am trying to write a function using a timer in such a way that is easily done with a delay node but I am not quite sure if it is going to do what I want it to. I want to apply if necessary some modifications to a player then skip a frame so that I can be sure that the modifications are applied.
HandleOnGameLoaded()
{
bool bIsTimerActive = IsTimerActive(TimerHandle_Delay);
if(!TimerHandle_Delay)
{
GameMode = GetAuthGameMode();
if(GameMode)
{
.....do something;
SetTimer(TimerHandle_Delay, this, &CLASS::HandleOnGameLoaded, 0.0f, false);
}
}
else
{
ClearTimer(TimerHandle_Delay);
}
}
I stripped the function down obviously. will this do what i described?