Well, after your post i rescripted the timeout , which ur way also made it much more effiecient thank you, but it still does not move right or down ;/
PHP Code:
function onTimeout() {
this.speed = ( ( this.level * .25 ) + .15 );
/*Checking for hitting of the dot.
if ( ( (ron_plr.x - ron_dot.x) < 1 ) || ( (ron_plr.x + ron_dot.x) < 1 ) ) {
if ( (ron_plr.x - ron_dot.x) < 1) || ( (ron_plr.x + ron_dot.x) < 1) ) ) {
this.score += ( this.level * 2.5 );
this.level += 1;
ron_dot.x = int[random( 1 , 248 )];
ron_dot.y = int[random( 1 , 190 )];
}
}
*/
ron_game.text = "Catch that Greasy Chicken! Score : " @ this.score;
if ( ron_game.visible != true ) {
this.gamestatus = "off";
}
if ( this.gamestatus == "on" ) {
for (temp.i = 0; temp.i < 4; temp.i++) {
if (keydown(temp.i)) {
this.direction = temp.i;
break;
}
}
ron_plr.x += vecx(this.direction) * this.speed;
ron_plr.y += vecy(this.direction) * this.speed;
ron_plr.dir = this.direction;
setTimer( 0.05 );
}
}