Game Development Community

Newb needs some help :O

by Ree Tardo · in Torque Game Engine · 01/21/2009 (4:52 pm) · 2 replies

Howdy,

Picked up TGEA recently and lookin for some newb answers.

I want to make a simple script that has the character increase his run speed 2x and bind it to the mouse right button.

Fished thru many .cs files and can't quite mock any of it to do just that.

I also have gone thru 3DGPAi1 tutorials but it has you setup for normal movments.

Not quite getting it...

Appreciate any help, thanks.

About the author

Recent Threads


#1
01/21/2009 (9:42 pm)
There could be several ways to do that. The "newbish" way would be to duplicate your player datablock and change the run speed for the second one. Then setup a keybind to swap your player body datablocks.

Or you could implement one of the sprinting resources and set the keybind to your mouse-button instead of the usual keyboard key. There is a scripted sprinting resource, but I wouldn't recommend it - although it does work it's easy for a player to cheat using it. This "Sprint Button" resource works well but does involve some code changes and a re-compile.
#2
01/21/2009 (11:39 pm)
Using a modified version of Amr's script seems to work well enough for now :)

Thanks again.