Scheduler class

Discussion in 'Plugin Development' started by HenkDeKipGaming, Dec 11, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    HenkDeKipGaming

    Het developers,

    So for my minigame, i need a lot of repeatingtasks and schedulers.
    But if I'm trying to make like a countdown scheduler, the first time it will just work. But the second time it will be much quicker and the timing isn't right.
    I think you can fix this by creating a new class implenting a scheduler or something, I read about it but I can't seem to find it anywhere.
    Can someone explain to me how to make a working countdown? Or just methods in an other class so it still works?

    Thanks!
     
  2. Offline

    mcdorli

    It shpuldn't get quicker if ypu use a timer
     
  3. Offline

    Zombie_Striker

    @HenkDeKipGaming
    So you want like the following:
    1st repeat: 20 ticks, 2nd repeat: 10 ticks, 3rd repeat: 5 ticks...

    For this, the best way to do this is having multiple delayed tasks being created one after the other, each being delayed by half of the amount of time the delay was set for for the previous task..
     
Thread Status:
Not open for further replies.

Share This Page