Home   Help Search Login Register  

Author Topic: Disable the Save Game or not :-\  (Read 748 times)

0 Members and 1 Guest are viewing this topic.

Offline White Angel

  • Members
  • *
  • White Angel
    • Armee Francaise Misison Developpement
Disable the Save Game or not :-\
« on: 05 Oct 2005, 13:50:54 »
Hi all,  

I have a little problem with a new beta mission i am working on.

All the mission is linked with a countdown. It start at the beginning of the mission and when the countdown reach zero the last objectif can be completed. The countdown appears on the top of the screen each minutes, with the help of a script. I like this idea in mission and i find it work pretty well.
The problem appears during testing when i do a savegame. After each save game the countdown start to the initial value  ???  it is a bit anoying because some of my triggers are linked with this countdown (some enemies meeting ...). And after a save game, when i am ready to attack at the good time, i need to wait the time i have planned for the approch  :-\

Is there a possibility to disable SaveGame in misisons or to save the point reach by the countdown in each Save Game ?

Thanks a lot.
« Last Edit: 05 Oct 2005, 13:51:33 by White Angel »
clic --> AFMoD (Armée Française MissiOns Développement)
clic --> R3F

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results."   George S. Pat

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Disable the Save Game or not :-\
« Reply #1 on: 05 Oct 2005, 14:02:36 »
I don't believe so.  The problem could be that the command time resets after a save.

Try using _time instead, this is the time since the script started running.

Or try saving the time periodically to a global variable and using that instead.

« Last Edit: 05 Oct 2005, 18:29:49 by THobson »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Disable the Save Game or not :-\
« Reply #2 on: 05 Oct 2005, 18:30:34 »
Something like:

*** NB Edited after it was first posted ***

Code: [Select]
CurrentTime = _time
BaseTime = 0
NewBase = 0
#loop
~1
if (CurrentTime > BaseTime + _time) then {BaseTime = NewBase}
NewBase  =  BaseTime + _time
CurrentTime = BaseTime + _time
goto"loop"

Then do all your checking on CurrentTime

« Last Edit: 06 Oct 2005, 07:36:04 by THobson »

Offline White Angel

  • Members
  • *
  • White Angel
    • Armee Francaise Misison Developpement
Re:Disable the Save Game or not :-\
« Reply #3 on: 06 Oct 2005, 12:33:36 »
Thank you very much THobson.

I have modified my script according to yours and it works pretty well.

 ;)
clic --> AFMoD (Armée Française MissiOns Développement)
clic --> R3F

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results."   George S. Pat