Jump to content

How to prolong a timer that is already running?


Recommended Posts

I have what it seems a principal problem concerning the understanding how timers are handled. I want to prolong a game timer after it is set so that it runs longer than in the original game. Since this timer is set at various places and to ensure compatibility also for a later install, what I wanted to do is to re-set the timer to a longer value.


The timer is the global timer (no real time) "udEscape". I patch the baldur.bcs with the following script block:



The block gets executed at the right time (checked by getting the variable in game). Still the original timer length "180" seems to be active, since the timer ends with all consequences about 5-10 min after it was originally set in the game.


It is the timer that runs after the deamon ritual in Ust Natha. I want to give the party enough time to return to the city before it gets hostile (in the mod, Adalon helps for this), but it doesn't seem to work the way I think it should. I checked with NI for the timer and for the "DrowCityHostile" variable in the game and see no reason why it should get set in my case if the timer is still running.


How would I prolong a running timer, or is it not possible? Or does anyone know what I might have overlooked in this particular case?

Link to comment

Short answer: IncreaseGlobal("TimerName","GLOBAL",Time_to_increase) should work.


Technical answer: timers are stored as the absolute time at which the timer will end. For example, assume you've been playing for 100000 wall clock seconds and start a RealTimer a day long (86400 seconds): the timer variable will be set to 186400. If you increase the timer by 3600 (one real-time hour), the timer variable will be set to 190000, effectively equivalent to prolonging the RealTimer by one hour. Same thing applies to in-game Timers.

Link to comment

No, IncrementGlobal didn't do it, either. I am clueless. I have not enough patience to test this timer prolonging thing. Maybe I overlooked something in this special case, but I wouldn't know what.

EDIT: I added a checkvariable and no, it is the mentioned script block that sets the variable. So the setting / increasing of the timer has no effect. Weird.

Link to comment

I checked several times, and it is one special script block that sets the variable, which only comes true if the timer run. The resetting of the timer was executed, too, and still it wasn't prolonged. I really don't know.


I resolved the problem now by adding another variable to the original game script block, now I have control over the execution of this block (it will be executed if the timer run AND the variable is set), which seems to work fine.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...