|
Post by shag00 on Jun 2, 2016 10:38:19 GMT 1
I know that Blitzkrieg does not support a wait time in scripting but I do remember that somebody found a work around for this, does anybody have any further info. I know this work around is probably around 10 years old. Thanks.
|
|
|
Post by Quintaxel on Jun 2, 2016 11:33:56 GMT 1
This is an interesting question. What exactly would you want to do with this wait function ?
|
|
|
Post by shag00 on Jun 2, 2016 23:20:56 GMT 1
If I were scripting a game it's a good way to introduce unpredictability when used with the random number command but specifically i wanted it to add a delay for a defend map I am playing.
If memory serves me correctly you were around in the BK Portal days and I thought you or other old hands might remember...
|
|
|
Post by Quintaxel on Jun 6, 2016 15:38:53 GMT 1
BK Lua does not have a wait function that uses the system’s clock but I’m sure there must be a work around for this. It depends on what is expected from such a wait function. I found this on the forum. Maybe this is the post (by Danzig) you were looking for.
|
|
bb
General
Blitzkrieg junkie (tried to quit several times).
Posts: 1,377
|
Post by bb on Jun 6, 2016 22:15:14 GMT 1
My Vokolamsk Highway is a deffensive map with several random scripts, after some time the action is interrupted and is simulated the end of the day using the ChangeWarFog command. The action is restarted again after 5 minutes and so on. I just used the KillScript command to make this. Anyway, this map will be released with my Moscow campaign, but I can send you a copy of this mission if you want to check.
|
|
|
Post by shag00 on Jul 3, 2016 22:21:04 GMT 1
Quintaxel, I think this might be it:
UPDATE:
Here is the Mission Timer function I use:
function MissionTimer() local minutes, seconds; minutes = GetIGlobalVar("TimerMinutes", 0); seconds = (10 + GetIGlobalVar("TimerSeconds", 0)); if(seconds == 60) then seconds = 0; minutes = 1 + minutes; SetIGlobalVar("TimerMinutes", minutes); end; SetIGlobalVar("TimerSeconds", seconds); -- if(seconds == 0) then -- DisplayTrace("Mission Time: %g:00", minutes, seconds); -- else -- DisplayTrace("Mission Time: %g:%g", minutes, seconds); -- end; end;
This way you can call the global variables when you need to time something. I commented out the display of the time.
Thanks a lot.
|
|