Weapons And the FPS Mod
by AutominTrashbin · in Torque Game Engine · 01/01/2003 (11:14 pm) · 5 replies
I've been playing with the engine for about a week or two, and I've gotten pretty far. I've learned my way around Hammer, figured out portals, I'm pretty damn proud of myself. =P
However, there is one problem. I'm trying to add a new weapon to the FPS mod. For starters, I decided to use a pistol. I have my 3D model with all of the Milkshape'd joints in place, and it has it's own folder in /shapes and .cs script in the proper place (/server/scripts). It appears in the level editor inside of Torque just fine, and it rotates just like a weapon, but upon walking over it, my character cannot pick it up.
I imagine the problem may lie in pistol.cs which is just rifle.cs after a quick text search-and-replace ("rifle" into "pistol"). I also tried copying rifle.cs verbatim into pistol.cs (an act of desperation, if you will =P) but the same problems occured. I realize that both may be a little messy but I can't figure out what exactly should be changed in the scripts to add a new weapon.
What do you guys think I'm doing wrong?
Oh, and sorry for drawing out such a simple problem this long. =)
-Paul9
However, there is one problem. I'm trying to add a new weapon to the FPS mod. For starters, I decided to use a pistol. I have my 3D model with all of the Milkshape'd joints in place, and it has it's own folder in /shapes and .cs script in the proper place (/server/scripts). It appears in the level editor inside of Torque just fine, and it rotates just like a weapon, but upon walking over it, my character cannot pick it up.
I imagine the problem may lie in pistol.cs which is just rifle.cs after a quick text search-and-replace ("rifle" into "pistol"). I also tried copying rifle.cs verbatim into pistol.cs (an act of desperation, if you will =P) but the same problems occured. I realize that both may be a little messy but I can't figure out what exactly should be changed in the scripts to add a new weapon.
What do you guys think I'm doing wrong?
Oh, and sorry for drawing out such a simple problem this long. =)
-Paul9
#2
Oh, and thanks for reccomending TribalIDE, though I've already been using it for a while. It's a pretty good development enviroment.
-Paul9
01/02/2003 (12:46 am)
D'oh! I cannot believe I missed something like that. I'm sorry for wasting your guy's time. =(Oh, and thanks for reccomending TribalIDE, though I've already been using it for a while. It's a pretty good development enviroment.
-Paul9
#3
I am having a somewhat problem. I followed exactely your same path. Everything is working but my weapon doesn't fire. Hints? The ammo are loaded correctly...I think.
Thanks,
Gabe
01/27/2003 (7:54 pm)
Hi,I am having a somewhat problem. I followed exactely your same path. Everything is working but my weapon doesn't fire. Hints? The ammo are loaded correctly...I think.
Thanks,
Gabe
#4
Thanks,
-s
01/28/2003 (8:13 am)
I'm having the same problem with my weapon not firing. What am I missing?Thanks,
-s
#5
Gabe
01/28/2003 (8:15 am)
I gotta right this morning. I think I had a typo error somewhere in the script.Gabe
Torque Owner Edward Smith
Silencersoft
You have to also add MaxInv[##]; 's to the player datablock in player.cs so to state how many the player is able to hold and be able to pick the weapon up also.