Global timer
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Global timer
Is there a way to set up a global timer, that will carry on at the same "speed" over different areas ?
A trip of a thousand leagues starts with a step.
Re: Global timer
Perhaps you could teleport the timer to the new area when the party changes location. Or attach it to the party.
Re: Global timer
I found the timer slows down, too, if the party leaves the level it's on.
Re: Global timer
I'm doing a timer test, I'll have a thread on it. If you want a global timer, you probably need it to "follow" the party wherever they go.
Re: Global timer
You create a separate timer for every level, and just have the timer on the party level be the next that updates your ticker
Finished Dungeons - complete mods to play
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Global timer
Thanks for the ideas, I will give it a try once I have some more script definitions
A trip of a thousand leagues starts with a step.
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Global timer
Something I could try is to have a "party_detect" timer that runs all the time on each level. If it detects the party on his level, then it starts the "global_timer" that is also on this level. If it doesn't detect the party, it turns the "global_timer" off.
I really don't like that. At all.
I really don't like that. At all.
A trip of a thousand leagues starts with a step.
Re: Global timer
The onGui / onUpdate timer solution will be the easiest to implement once we get the reference.
Re: Global timer
I suddenly got this crazy idea that I have to try to attach a TimerComponent to the Party-object. And you know what? It works
then in script:
Now you have a timer which follows the party. But I haven't tested this much, so it's possible that it causes some problems.

Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Timer"
}
}
}
Code: Select all
party.timer:addConnector("onActivate", "t", "onPartyTimer")
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450