Timer running slow when placed in other levels

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Timer running slow when placed in other levels

Post by petri »

Yes, you got it right :)
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post by Komag »

question about sleep - it was mentioned that during sleep timers move 2X speed - is this definitely accurate?
Finished Dungeons - complete mods to play
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Timer running slow when placed in other levels

Post 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).
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post 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.
Finished Dungeons - complete mods to play
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Timer running slow when placed in other levels

Post by petri »

Maybe x4?
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post 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
Finished Dungeons - complete mods to play
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post 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?
Finished Dungeons - complete mods to play
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post 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
Finished Dungeons - complete mods to play
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Timer running slow when placed in other levels

Post by petri »

Yeah, only entities that in a champion's inventory or in a level are updated.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Timer running slow when placed in other levels

Post 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). :)
Finished Dungeons - complete mods to play
Post Reply