Foxcode,
Don't you have any real work to do ?
Just kidding, I appreciate the feeback, the keyboard game play is much smoother.
You can basically fly your guy around in circles and shoot to your hearts content
Here is the new onKeyDown function
// suggested changes courtesy of foxcode at clockwork chilli// changed to allow turning and movment keys to be pressed at the same timegameGui.onKeyDown = function(eventData) { var player = wade.app.getActivePlayer(); // up arrow = fire if (wade.isKeyDown(38)) { player.character.fire(); } // handle turning a = rotate left, d = rotate right if (wade.isKeyDown(65)) { player.character.turn(-wade.app.TURN_STEP); } else if (wade.isKeyDown(68)) { player.character.turn(wade.app.TURN_STEP); } // handle movement w = walk forward, s = walk backward if (wade.isKeyDown(87)) { player.character.moveDir(0); } else if (wade.isKeyDown(83)) { player.character.moveDir(180); } return true;}; // end onkeydown
I also had to make a small modification to the onUpdate function.
Just changed else if to if for the key down check.
I have tested this out and it works on my machine.
I have some other stuff to do, but there should be a new version of the game on my site by tonight my time.
Thanks for the help, I owe you a beer, or a redbull, or whatever you guys are drinking these days.
Okay, the latest version is up there - 4 levels, new units (cannoneer (friendly) and gun turrets (hostile)), better transition between levels.
Still TODO - 3 more levels, (maybe I should have named it sector 4), health bars, air strikes.
cheers,
Shri