Thank you for your answer. Now I have the following problem. When I press the spacebar the light will be on, but not flicker. This is the code:

Code:
function strobo() {
	vec_set(my.blue,vector(255,255,255));
	while(key_space) {
		my.lightrange = 200;
		wait(-0.01);
		my.lightrange = 0;
		wait(-0.01);
	}
}

action stroboscoop {
	while(1) {
		if(key_space == 1) {
			strobo();
		}
		wait(1);
	}
}