I have a script here that I cannot get working. Here is the idea behind it:
I have 6 targets in a room.
When blufor activates trigger, a timer begins. The format is seconds/milliseconds.
When all six targets are down, timer ends and a hint format box pops up and displays time taken in seconds.
I had already set an object down to reset the targets using action menu. I would like to tie this in with resetting the timer as well.
Here is what I have so far but I am receiving errors.
*****************************************************
;start timer and display start message
hint format["The timer has been reset to 0 seconds"]
~1
_count = 0
#loop
_count = _count+1
?(alive t1) and (alive t2) and (alive t3) and (alive t4) and (alive t5) and (alive t6): goto "loop"
;display end message and time taken
hint format "All targets cleared" /n "Time Taken: " _count " seconds"
~5
********************************************************************
What happens when I load this up, I get the hint format prompt, "timer has been reset..." and it doesn't go away. If I continue to shoot targets and knock them down, nothing happens after that.
I have no idea about how to code the timer to reset using an action menu.
Just curious if any of you scripting guru's can help me out. I'm somewhat new at this so be gentle.