Yup Key_lock var will fix that.
Code:
var KEY_F_LOCKEDO_OR_OPEN = 0
if(!key_f && KEY_F_LOCKED_OR_OPEN == 1)
KEY_F_LOCKED_OR_OPEN =0;
IF(key_f && KEY_F_LOCKED_OR_OPEN ==0)
{
 KEY_F_LOCKED_OR_OPEN = 1;
 .... CALL FLASHLIGHT/TIMER HERE...
}

void count_down(){
my.ambient = 100;
my.lightrange = 150;
// while we still have to count down:
while(counter_timer > 0 && key_f) // CHANGED
{

// DEBUG_VAR(counter_timer, 10);

// count down each second:
counter_timer -= time_step / 16;

wait(1);
}
my.ambient = 0;
my.lightrange = 0;

}


Last edited by Malice; 04/04/15 16:39.