Game Development Community

Numbered weapon selection like doom?

by Tom Timothy · in Torque 3D Professional · 01/25/2011 (8:32 pm) · 2 replies

I am looking for a weapon selection such as found in doom 3 or half life. aka hit 1 equips your pistol 2 equips rifle so on. Ive searched around havent seen a resource like this any one got something in there back pack of code?

#1
01/25/2011 (8:42 pm)
Actually the function you are looking for is already built in to Torque:
moveMap.bindCmd(keyboard, "1", "commandToServer(\'use\',\"RocketLauncher\");", "");
This line of code can be found in config.cs and default.bind.cs and you can duplicate and modify it for your own needs.
#2
01/25/2011 (9:15 pm)
Actually it's hiding in the T3D(private) "resources and code sharing" forum. This resource doubles-up your weapons like Half-Life2, so each button can hold 2 guns. Make sure you read all the way through the thread.

[edit]
Actually, why don't I stick it under the resources section where it can be found easier ...