TNT Basic Forums > Game-In-60 Tutorials Q&A
TRON: Can't control player using keyboard, OSX
< Last Thread  
Thread        Post A Reply

08-11-2009 04:13

Posted by:

LBC (langley British Columbia)

Find more posts by Destro

Hi there,
Everything seems good except the keys don't work, so I changed them to the numbers corresponding to the arrow keys for player1, didn't work.
Help file isn't much good, says mostly everything about inputs in OSX is disabled. See I read Socrates' post about how the program should check for the player pressing that key constantly so it knows when I've pressed it (makes sense) but how do I do that in OSX TNT if I can't 'poll' and stuff?
I don't see it in the game-in-60 tutorial how it's checking whether the keys are being pressed or not...

very new to programming btw.

08-12-2009 01:29

Posted by:

Click Here to Email appleide   Find more posts by appleide

I think its to do with Input Sprocket not working on OS X. There is a work around. You might want to look up the command reference work one out.

08-15-2009 23:07

Posted by:

Great Wet North (Vancouver)

Find more posts by swagIT

try replacing the player code segment with this:

main loop
' read player 1 input
if up ' w = up
if player1Dir <> 3 then player1Dir=1
else if down ' s = down
if player1Dir <> 1 then player1Dir=3
else if left ' a = left
if player1Dir <> 4 then player1Dir=2
else if right ' d = right
if player1Dir <> 2 then player1Dir=4
else if space ' left shift = turbo
end if

All times are GMT        Post A Reply

Forum Jump:
< Last Thread  

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.