Quote:

Code:

var inc;
define speed, skill2;

if (key_q==1)
{
if (my.speed >= 3) {inc = -0.1;}
if (my.speed <= 0) {inc = 0.1;}
my.speed += inc * time_step;
}






This will work but the problem is that he's slow down if you keep the key pressed. I want that he automatic stops at 3. When you press the key again he slows down to 0. Is this possible?