Key mappings on the mac
by Benny · in Torque Game Builder · 07/25/2008 (7:48 am) · 4 replies
I seem to be having a problem with the key mappings on the mac. i have tried all the combinations of ways to do it from bind to bindcmd and of course bindobj. all of these work perfectly fine on the PC version of my builds but the mac version still has no response to keyboard controls that i set up in the game.....can anyone help me on this one as it is not straight forward or an i missing something?
#2
moveMap.bindObj(getWord(%this.upKey, 0), getWord(%this.upKey, 1), "moveUp", %this);
moveMap.bindObj(getWord(%this.downKey, 0), getWord(%this.downKey, 1), "moveDown", %this);
moveMap.bindObj(getWord(%this.leftKey, 0), getWord(%this.leftKey, 1), "moveLeft", %this);
moveMap.bindObj(getWord(%this.rightKey, 0), getWord(%this.rightKey, 1), "moveRight", %this);
07/28/2008 (6:23 pm)
This is the main meat of it ....i have try all 3 ways to do it and still now response from the mac as far as input. But again it works fine on the PC.moveMap.bindObj(getWord(%this.upKey, 0), getWord(%this.upKey, 1), "moveUp", %this);
moveMap.bindObj(getWord(%this.downKey, 0), getWord(%this.downKey, 1), "moveDown", %this);
moveMap.bindObj(getWord(%this.leftKey, 0), getWord(%this.leftKey, 1), "moveLeft", %this);
moveMap.bindObj(getWord(%this.rightKey, 0), getWord(%this.rightKey, 1), "moveRight", %this);
#3
Are you getting any console errors when this code is executed or when you press a key?
Does %this exist in the method? Its easy to forget to add it as an argument.
What is the value of %this.up/down/left/rightKey when this is called? Perhaps they are empty strings for some reason?
Do the methods you are binding to definitely exists? Does the moveMap exist at the time this is called?
07/29/2008 (12:13 am)
I don't know of any specific issues on the mac since I don't use one... but I can through some general troubleshooting questions at you...Are you getting any console errors when this code is executed or when you press a key?
Does %this exist in the method? Its easy to forget to add it as an argument.
What is the value of %this.up/down/left/rightKey when this is called? Perhaps they are empty strings for some reason?
Do the methods you are binding to definitely exists? Does the moveMap exist at the time this is called?
#4
moveMap.bindCmd(keyboard, "t" , "" , "echo(\"t key\" );");
That works for me on the Mac.
You should see the results in the console.
Eyal.
07/29/2008 (8:23 am)
Can you try this?moveMap.bindCmd(keyboard, "t" , "" , "echo(\"t key\" );");
That works for me on the Mac.
You should see the results in the console.
Eyal.
Torque Owner Eyal Erez