you can use it when the animation is finished or when the animpos = 0 again you can press again. So disable when pressed. then enable when the animation finishes... simple

So on your keydown left and right (ill just do right)
Declare a variable called "finished" as an integer ( you could also use a boolean but id normally use finished to indicate other things later on in the game)
- Code: Select all
if (finished == 1)
{
ChangeAnimation("Event Actor", "r2", FORWARD);
xvelocity=3;
finished = 0;
}
Then on animation finished(Any should be fine) if not the moving animation right.
- Code: Select all
finished = 1;