Weird Timer Issue - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Weird Timer Issue (/Thread-Weird-Timer-Issue) |
Weird Timer Issue - pinku - 08-31-2013 07:39 PM Hey everyone! How's your day? =P Something is driving me insane. I currently have a problem with a very, very old script, that used to work just fine back in the days (or maybe I fooled myself all this time?! ) Code: [function rareSpawn] As you can see, it is a random spawner. It picks a POS, TYPE and RACE and spawns. After the timer in the manager, it removes the spawn and picks another POS, TYPE and RACE. Problem is: Apparently, it is working, but it's not! When I check locations, they have the same mount as the day before after the 24 hours have passed. I then, check the manager with .tweak/.info and the time for the next spawn is exactly and always the 86400 (24 hours). Alright, I go back to the locations and boom, a new POS/TYPE/RACE was picked... But the weirdest thing is that if you test with lower times, it will work just fine, without me having to .info it! Now I wonder, why is .info triggering it? Why does it work with low times and not with high times? Thanks everyone for reading! RE: Weird Timer Issue - darksun84 - 08-31-2013 10:14 PM It's possible that is related to Sectors sleeping (timer stop ticking if there are no players in a sector for a while), maybe you can use timerf. RE: Weird Timer Issue - RanXerox - 09-01-2013 12:30 AM Also, the spawner various spawner items (a function creates a spawner item which then creates another spawner item) may need a decay flag for the timer to fire properly when it does eventually reach that point. As Dark said, sectors with no people in them tick slower than others... so time passes, but at a fraction of normal. RE: Weird Timer Issue - Mordaunt - 09-02-2013 11:55 AM Check this: Random Rares Inspired by your problem. RE: Weird Timer Issue - pinku - 09-02-2013 07:03 PM The problem was indeed the sectors. I ran some tests with it and can't be anything else. Fool me, I didn't know about this before. Thank you both dark and Ran! (09-02-2013 11:55 AM)Mordaunt Wrote: Check this: Random Rares I feel honored but I know I should not. xD Thanks Mourdant, it is a big help! |