Quote:
PHP Code:
function onTimeout() { if (this.boots == true) { for ( temp.key = 0; key < 4; key++) { if(keydown(key)){ player.x += vecx (key) * this.speed; player.y += 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