Game Development Community

TGE 1.5.2 Demo - Sprint Feature through Keybind

by Dan · in Torque Game Engine · 10/13/2013 (7:38 pm) · 5 replies

Another hopefully straight forward question. I would like to add a sprinting feature through the use of pressing a key. Probably would make sprint speed x1.5 normal run speed.

I did find a resource for sprinting in T3D but I'm a noob and can't seem to apply T3D material to TGE.

If anyone is familiar with both platforms and would be so kind as to assist me here is the resource

http://www.garagegames.com/community/resources/view/2697

#1
10/13/2013 (9:34 pm)
That resource wasn't for T3D - it's dated back in 2002 and T3D was released in 2009....

However, TGE did have improvements rolled in as late as 2009-ish so there may be other source code differences that would make applying the resource confusing.

This resource does require modifying the engine source, so if you're using the demo you can't add sprinting.
#2
10/14/2013 (9:12 am)
Be sure to read through the whole thread since additional fixes and tweaks were added over time. That particular Resource will easily work in any version of TGE, TGEa, or T3D -- but as Richard mentioned if you don't have the source then you can't implement it. There is a scripted sprinting hack somewhere, but it's terrrible...
#3
10/14/2013 (12:37 pm)
Oh, now I see the date. I didn't even realize Garage Games kept threads over a decade old. Sorry about that.

So I'm guessing adding a temporary Run/jump force boosting object is out of the question?
#4
10/14/2013 (6:25 pm)
No, not at all - but "sprinting" usually means something special to FPS gamers. There are animation triggers involved so that your player avatar will actually look like he's sprinting while the speed boost is in effect and it usually involves some sort of energy or stamina drain as well - keeps you from sprinting for 12 miles....

Speed boosts or jump force changes have to be done server side (scripting or not) because Torque ignores changes to datablocks from clients. Now that I'm thinking about it I'm not sure exactly how I'd handle that - time to start experimenting....
#5
10/14/2013 (7:52 pm)
Well, if you have the time and are willing, I'd greatly appreciate that!

Edit: Oh, I just thought of something else from my previous thread. Would it be possible to implement a key system so that I can only use the mission trigger if I have already come in contact with a key object/trigger?