1. So say I made a timer like, timer.Once(30, () => DoStuff)
    How would I pull what number that timer is on so like when it reaches 20 I can broadcast. But I dont want to stop that timer as it would be user specific not allowing me to create a timer for 30, 20, 10, etc.
     
  2. Wulf

    Wulf Community Admin

    I don't think you can get what count it is on. PS. This has been answered at least once before. ;)
     
  3. Lol, sorry <3. Is there any way that I could like make a timer count down and print that time? Im not sure there is any function or hook I can use.
     
  4. Wulf

    Wulf Community Admin

    Just put a print inside the timer:
    Code:
    var counter = 30;
    timer.Repeat(1f, counter, () =>
    {
        Puts($"{counter - 1}");
    });
    Or something like that. This would be the closest you can do to check what count it is on if you repeat it every second.
     
  5. That works, thanks!
    [DOUBLEPOST=1463433144,1463366337][/DOUBLEPOST]Fixed: heres the code I am using.
    Code:
            [ConsoleCommand("start")]
            void start()
            {
                var currenttimer = 10;
                var time = 10;
                screent = timer.Repeat(1f, currenttimer, () =>
                {
                    if(time == 1)
                    {
                        time = 0;
                        currenttimer = 0;
                        Puts("1");
                        timer.Once(1f, () =>
                        {
                            Puts("Finished!!!");   
                        });
                        screent.Destroy();          
                    } 
                    else
                    {
                        Puts(time.ToString());
                        time--;  
                    } 
                });
            }
    [DOUBLEPOST=1463433180][/DOUBLEPOST]Screent is my variable for the timer btw. Here is how I defined it: private Timer screent = null;
    [DOUBLEPOST=1463511446][/DOUBLEPOST]If you want to see a full version of that I will release a full version via plugin submission soon :)