Home   Help Search Login Register  

Author Topic: Timer Script  (Read 422 times)

0 Members and 1 Guest are viewing this topic.

Kilo11

  • Guest
Timer Script
« on: 04 Jun 2004, 19:59:25 »
Hello,

I am making a training mission that requires you to drive down a road (in simple terms) and make it to the finnish.  There is a START and a FINISH that I have setup.


What I need is a script that would start once the driver enters the START trigger, it will start a clock watch if you will.  When the unit gets the the FINNISH trigger, the script will display the exact time that he/she took to finish the course.

If anyone could give me the command or script or point me in the right direction id be greatful.  Thanks!


-=Kilo=-

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Timer Script
« Reply #1 on: 04 Jun 2004, 20:09:10 »
The reserved variable time records the mission time.   By checking at at start and finish and doing some arithmetic. ..

Alternatively, the reserved local variable _time records the time since the script started.     Call a script at the start and extract the variable at the finish.

No time for details now, hopefully that will help.
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Timer Script
« Reply #2 on: 04 Jun 2004, 20:38:00 »
Start a script where in the start trigger. Make it look like this:

@ blabla
hint format ["Your time was: %1 seconds.", _time]
exit


In the end trigger, turn the boolean blabla into true.

:beat: *Gets Shot* :beat:

Kilo11

  • Guest
Re:Timer Script
« Reply #3 on: 04 Jun 2004, 20:56:55 »
THANKS!


-=Kilo=-
« Last Edit: 04 Jun 2004, 20:59:30 by Kilo11 »