Timers and Delay Node.

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?

Yesterday i read a postfrom a guy, saying that with blueprints a timer with 0.0f won’t call the function at all.
So, may be you should add something there.

You can use FTimerManager::SetTimerForNextTick() to delay for one frame. Using 0.f will cause the timer to not be called at all.

https://docs.unrealengine.com/en-US/…k/4/index.html

Thumb up !

Thank you for the post and insight silik1!

thank you for the solution TheJamsh!