OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Freak on 12 Sep 2002, 10:07:49
-
i would like to see a script where it shows the time that have past since its been triggered also if possible another trigger stops it with total time shown thanks guys
-
;following script counts seconds into a timepool
;until you trigger it to stop by making
; "stoptime" true
;to make stoptime true, set a trigger with ur custom
;conditions and in its 'on activation' field:
;stoptime=true
;i think .....
time = 0
#timer
time=time+1
~1
?(stoptime=true):goto "end"
goto "timer"
#end
hint format["It's been %1 seconds since the timer started to count.", time]
exit
;be more specific in what u want to do,
;helps more to figre out ur problem...
-
Only time is a reserved variable.
Time script:
#top
@((_time mod 300 < 5) or (stoptimer))
?stoptimer:goto "stopped"
_temptime = _time
TitleText [format ["Elapsed Time: %1 Min", (_temptime - _temptime mod 60)/60], "PLAIN DOWN", 2]
@(_time > _temptime + 5) or stoptimer
TitleText ["", "PLAIN DOWN", 1]
?stoptimer:goto "stopped"
goto "top"
#stopped
_Temptime = _time
TitleText [format ["Total Elapsed Time: %1 Min, %2 Sec", (_temptime - _temptime mod 60)/60, (_temptime mod 60) - ((temptime mod 60)mod 1)]
exit