Game Development Community

Player Movement

by Bruno · in Torque Game Builder · 05/01/2006 (1:06 pm) · 2 replies

Hi.,

I have been having some reports, that in some computers the combined keys (diagonals + fire), or diagonals, are not working.
I'm not doing anything special here, i'm just doing it the same way it's done in the Torque demo., so, is there some special way to make this work, or wasn't the demo using the correct way ?

The way i'm doing, it's basically this :

playerMap.bindCmd(keyboard, "w", "playerUp();", "playerUpStop();");
playerMap.bindCmd(keyboard, "a", "playerLeft();", "playerLeftStop();");
playerMap.bindCmd(keyboard, "space", "playerFire();", "playerFireStop();");



function playerLeft()
{
  $player.setLinearVelocityX( -35 );
}

function playerLeftStop()
{
 $player.setLinearVelocityX( 0 );
}


thanks,
Bruno

#1
05/01/2006 (1:29 pm)
You are probably running into a hardware (keyboard) issue, not a code one: some keyboards are basically not able to generate input events for certain combinations of keys based on the scan lines of the hardware itself. See my previous post on the topic here.
#2
05/02/2006 (6:56 am)
Thanks Stephen.,

I see this can be a big problem then., but if that's a keyboard hardware error, then it should happen with all games, no ?
I mean, if this is happening to some players, then it would not just be happening in Torque, it should be happening in all games, and if this is so, then they would not complain, because it wasn't anything new to them, right ?
There's no solution to this then ???