Hello everbody,
I want to make a stroboscope. I have a model with an action:
action stroboscoop {
while(1) {
if(key_space == 1) {
strobo();
}
wait(1);
}
}
And the following function:
function strobo() {
vec_set(my.blue,vector(255,255,255));
if(key_space == 1) {
while(1) {
my.lightrange = 200;
wait(-0.01);
my.lightrange = 0;
wait(-0.01);
}
}
}
When I press the spacebar the light will flicker. But when I release the spacebar the light continues flickering. Does anybody know how to stop that?
So when I press the spacebar. The light will flicker as long the spacebar is pressed. When I release the spacebar, the flicker will stop.
I hope you can help me out.
Thanks in advance.