Problem with Tetris keybinds
by James Daniel · in Torque Game Builder · 04/13/2007 (9:04 am) · 6 replies
I've got another problem with the Tetris tutorial....the keybinds for rotating the tile don't work. I've even tried the full sample code for it (Tetris). I'm running all this on a MacBook Pro (Core 2 Duo) if that makes any differance.
#2
Yes, the rotate binds are in the same setupKeybinds
No, there are no error messages
I tried using echo for debug messages to see if the function(s) are call and they are not being called.
I did't know the Mac version of Torsion was out yet, where can I ge a copy?
04/13/2007 (10:25 am)
Yes, the left/right/down binds work.Yes, the rotate binds are in the same setupKeybinds
No, there are no error messages
I tried using echo for debug messages to see if the function(s) are call and they are not being called.
I did't know the Mac version of Torsion was out yet, where can I ge a copy?
#3
Just in case it's anything to do with the "[" and "]" keys on the Mac, try using the keys "z" and "x" in the binds or some other key.
04/13/2007 (11:00 am)
Sorry, by the time I'd done writing the reply I'd forgotten you were using a Mac. Just in case it's anything to do with the "[" and "]" keys on the Mac, try using the keys "z" and "x" in the binds or some other key.
#4
04/13/2007 (11:10 am)
It would seem to be the "[" and "]" keys as the rotation works with "z" and "x" keys. So the question is why this is?
#5
Probably worth making a brief post in the bug forum with a link back to this thread. Mention which version of TGB you're using and maybe try a few more keys such as , . / \ ' # and see if any of those have a similar problem.
04/13/2007 (11:36 am)
It may be a bug with the Mac version of TGB, or it could be something has broken on the more recent version of TGB.Probably worth making a brief post in the bug forum with a link back to this thread. Mention which version of TGB you're using and maybe try a few more keys such as , . / \ ' # and see if any of those have a similar problem.
#6
04/13/2007 (4:06 pm)
Good suggestion, I do that.
Torque Owner Gary Preston
Do you get any errors on the console?
Try putting the following in your rotateClockwise function
echo("DEBUG TEST - rotateClockwise function");Put it at the top of the function, just above the if statement E.G
function rotateClockwise(%val) { echo("DEBUG TEST - rotateClockwise function"); if(%val) { ... rest of function continues } }Rerun the game and see if pressing the rotate clockwise key brings up the DEBUG TEST message in the console.
If you have torsion, you can also do this by setting a breakpoint on the "if(%val)" line and seeing if the game breaks out when you press the rotate key.