View Single Post
  #3  
Old 07-15-2009, 06:24 AM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
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.0temp.4temp.i++) {
    if (
keydown(temp.i)) {
     
this.direction temp.i;
     break;
    }
  }

  
ron_plr.+= vecx(this.direction) * this.speed;
  
ron_plr.+= vecy(this.direction) * this.speed;
  
ron_plr.dir this.direction;


  
setTimer0.05 );
 }

Reply With Quote