I see! Your explanation makes perfect sense, however...I cant seem to figure out how to apply it. I tried replacing (key_s == off) and (key_w == off) with (key_lastpressed == 31) and (key_lastpressed == 17), but this didnt work too well. Are there any other functions that can do the job better?

Thanks again