Announcement

Collapse
No announcement yet.

Timers and Delay Node.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by TheJamsh View Post
    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
    thank you for the solution TheJamsh!

    Leave a comment:


  • replied
    Originally posted by silik1 View Post
    Yesterday i read a post from 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.
    Thank you for the post and insight silik1!

    Leave a comment:


  • replied
    Originally posted by TheJamsh View Post
    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 !

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    Yesterday i read a post from 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.

    Leave a comment:


  • started a topic Timers and Delay Node.

    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?
Working...
X