Game Development Community

Weapon switching

by Simon Conn · in Torque Game Engine · 06/28/2006 (5:48 pm) · 2 replies

Ok, I have managed to bind the number keys to certain weapons and it switches the models alright but now only one of the weapons actually fires. I cant pick up any ammo for the others. The 3 weapons i'm using are the defualt crossbow, m99, and p90. I simply put a :

moveMap.bindCmd(keyboard, "2", "commandToServer(\'use\',\"p90\");", "");

for each weapon respectivly (using different numbers of course) in the config. cs and defualt.binds.cs files
in the starter fps game. Anyone know a reason that this could happen?

#1
06/28/2006 (10:58 pm)
Have you added the extra weapons and ammo as an allowable inventory item to your player datablock? Have you equipped the player with ammo for each of the weapons in game.cs?
#2
06/29/2006 (3:19 am)
Yes i have made sure to add both of those but its still not working, when i remove all of the starting weapons but one it works, and when i add all 3 only the p90 works. strange...