Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Timer doesn't loop
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#2
RE: Timer doesn't loop

This is pure speculation,

try moving the
AddTimer("Update", 2.0f, "Update");
above the rest of the code in the Update function.

void Update(string &in asTimer)
{
    AddTimer("Update", 2.0f, "Update");
    playerIsRunning = (GetPlayerSpeed() > 3) ? true : false;
    
    if(playerIsRunning)
    {
        //AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
        if(mainTimeDivider == 10){
            //Do nothing
        }
        else
        {
            mainTimeDivider++;
        }
    }
    else
    {
        //AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
        
        if(mainTimeDivider == 0){
            //Do nothing
        }
        else
        {
            mainTimeDivider--;
        }
    }
    
    AddDebugMessage("Current main time divider: "+mainTimeDivider+"", false);
}

12-31-2014, 02:20 AM
Find


Messages In This Thread
Timer doesn't loop - by Neelke - 12-31-2014, 01:51 AM
RE: Timer doesn't loop - by 7heDubz - 12-31-2014, 02:20 AM
RE: Timer doesn't loop - by Neelke - 12-31-2014, 12:32 PM



Users browsing this thread: 1 Guest(s)