View Single Post
  #6  
Old 12-16-2011, 08:16 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
Quote:
PHP Code:
 function onTimeout() { 
if (
this.boots == true) {  
  for ( 
temp.key 0key 4key++) {  
                                    
   if(
keydown(key)){  
    
player.+= vecx (key) * this.speed;  
    
player.+= vecy (key) * this.speed;  
                                 
  }  
}   
  
setTimer(0.05);  
  } 
 } 
You should fix this up... temp.key and key are 2 different variables.

Apart from your coding and the obvious errors your script is kinda alright...

You can get rid of both flag toggle lines and just have this.boots=!this.boots though. Just a little shortcut
Reply With Quote