temnix Posted October 5, 2019 Share Posted October 5, 2019 I want to call on the people here who know more about timers and variables than I do. What I need is some kind of "moving measure of time" which it would be possible to get ahead of or behind with AdvanceTime(). This gets complicated, so let me explain, for contrast, what I hoped for from local timers and variables. I thought that I could set a local timer and that the corresponding local variable would "tick-tack" quietly and increment until it matched the set value, like a time bomb, and then the timer would resolve itself. If so, I could then use AdvanceTime() to go ahead in the game engine's "timeline," its counting of ticks, to the point when this resolution happens or beyond, and the timer would resolve immediately. And this can be done (though not for the reasons I thought). But I also believed that I could use AdvanceTime() with a negative value to travel back along this accruing local to when it was 0 and so unset the variable and return the timer to the never-set state, where it could be detected with !GlobalTimerNotExpired, or at least have a "live" variable that would be bigger in the future, smaller in the past. And if I could push this "live" variable far back enough by going back in time deep enough, I would get it to 0 or even a negative value. I was wrong. Variables of timers aren't "live" and incrementing this way. They are more like fish hooks thrown far ahead to some predetermined point, and though it's possible to go forward in time and make the timers trigger right away or back in time and put distance before that moment, there is no way to return to the moment when the variable was anything but what it has been set to. I can set it to 0 by hand, but I wouldn't know when. So what I'm looking for now is this incrementing and, for going back, decrementing, "live" measure - I guess it must be the engine time as such. I want to have a measure of it so that I know how far back to go. But I don't see any triggers for game time... And if you want to know what I need it for, I'll tell you. The scenario is this: a creature has died, and mechanisms have been put in to resurrect it when a PC comes in marked as a time traveler (with a global variable). The party casts the time travel spell, activating a negative AdvanceTime(), rewinding the clock with everything that entails, and the time traveler global is set. With this flag hoisted the dead know that it is the past and they are supposed to be still alive, and the mechanisms to resurrect them do their job. The problem, and the only part I don't have working yet, is that the resurrection doesn't know when to stop. This being the past already, whenever the creatures are killed again, they will right away be revived - and so on forever. What should happen instead is that for every time trip creatures get un-died once. I can remove the resurrection mechanisms after they do their job, and that will make the wonder once-only, but then the creatures will be permanently dead and will not rise again when and if the PC comes to them from the future a second time. I can also set the time traveler global to 0 when this resurrecting happens, lower the flag, but then creatures dead in other areas will not know what to look for. The crux of the issue, as they say, is that in whatever way I mark the dead ones so that they stop rising for this trip, that mark is permanent. Since time travel in this engine is only a simulation, the marks never go away, and I can't go back to before I left them using AdvanceTime(), which is what I hoped for from local variables and timers. If a timer has been set, then it is set, and if it has resolved, that's also recorded. Maktub, as Muslims say. But if I can latch on to something that is not fixed but actually moving, the sliding silky ribbon of engine time itself, what I can indeed send this way and that with AdvanceTime(), only I don't know how to ask and tell what game time is it/it is - then I can put events uniquely in their moments and return to those moments. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.