Page 2 of 3

Re: Timer running slow when placed in other levels

Posted: Fri Oct 12, 2012 7:44 pm
by petri
Yes, you got it right :)

Re: Timer running slow when placed in other levels

Posted: Thu Oct 18, 2012 1:07 pm
by Komag
question about sleep - it was mentioned that during sleep timers move 2X speed - is this definitely accurate?

Re: Timer running slow when placed in other levels

Posted: Thu Oct 18, 2012 5:06 pm
by petri
Not exactly. Time passes faster when you sleep. So everything, not just timers, goes faster. I don't remember the exact time multiplier right now though (at home).

Re: Timer running slow when placed in other levels

Posted: Thu Oct 18, 2012 5:25 pm
by Komag
I'm experimenting a bit and it seems like it might be something around 5x faster while sleeping, but I'm not sure. I'll try to test it more to be very accurate, as this will help me set some things up correctly.

Re: Timer running slow when placed in other levels

Posted: Thu Oct 18, 2012 5:26 pm
by petri
Maybe x4?

Re: Timer running slow when placed in other levels

Posted: Thu Oct 18, 2012 5:51 pm
by Komag
Just to be sure I went ahead and set up a small room with a button, timer, and door. I experimented with the timer set to varying amounts, to open the door. Smaller numbers had too much room for error, whether I counted accurately, delayed pushing the rest key for a second or two, etc. So I found bigger numbers were better for good results.

With the timer on 660, for example, I press the button and immediately rest. I rest for 120s, then wake, then the door opens after 60 more seconds, thus the 120 = 600, for a multiplier of 5x

Re: Timer running slow when placed in other levels

Posted: Tue Oct 30, 2012 8:50 pm
by Komag
what about a timer spawned "up in the air" at map start, like this:

Code: Select all

spawn("timer",nil,nil,nil,nil,"myCoolTimer")
would that timer always have full processor priority such as being on the party.level, so it gets updated every frame?

Re: Timer running slow when placed in other levels

Posted: Tue Oct 30, 2012 9:01 pm
by Komag
bah, never mind I guess, it seems you can't make use of a timer that's just there up in the air, nothing I try with it seems to work

Re: Timer running slow when placed in other levels

Posted: Wed Oct 31, 2012 9:55 pm
by petri
Yeah, only entities that in a champion's inventory or in a level are updated.

Re: Timer running slow when placed in other levels

Posted: Wed Oct 31, 2012 11:13 pm
by Komag
I solved it by always checking whether the party was still on the same level as the timer, and if not, deleting the timer and creating a new one on the party level. The timer was ticking a script "counter" which simply continues to tick with the new timer, no problem (although I built in one extra tick to make up for a bit of lost time in the transition). :)