Game Development Community

Key binding help

by Matt Berry · in Torque Game Engine · 12/02/2006 (9:37 am) · 2 replies

I am creating a racing game and I do not know how to do the key binging correctly. I need to be able to press the numbers 1-9 and I want each of them to change the MaxForwardSpeed of my player to a different value. I can change the speed easily from the console by typing playerShape.MaxforwardSpeed = 10 for example. I just can not get it to work using a script with preset numbers that change my players speed. Can someone please help me this is the last step in a project that I have to complete very very soon. thanks

#1
12/03/2006 (6:33 am)
Theres a quick snippet of code here talking about a throttle system. You could just take out the stuff he mentions about having it get higher and higher the longer it's pressed... Might be helpful.
#2
12/04/2006 (3:14 am)
Thanks! I will give this a try. Hopefully it will get the job done.