Home   Help Search Login Register  

Author Topic: stopwatch effect  (Read 1154 times)

0 Members and 1 Guest are viewing this topic.

Freak

  • Guest
stopwatch effect
« 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
« Last Edit: 12 Sep 2002, 10:08:52 by Freak »

ElemenS

  • Guest
Re:stopwatch effect
« Reply #1 on: 12 Sep 2002, 18:16:32 »
;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...

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:stopwatch effect
« Reply #2 on: 12 Sep 2002, 21:43:59 »
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
Dinger/Cfit