Game Development Community

Dual-Wielding weapons possible?

by Kenneth Beckerdite · in Game Design and Creative Issues · 11/30/2004 (12:26 pm) · 24 replies

I want to make a FPS and I was wondering if dual-wielding weapons is possible for my game?
Page «Previous 1 2
#1
11/30/2004 (12:30 pm)
Considering a number of games have done it, it's definitely possible. Whether it's within your coding capabilities is more likely the question you should be asking. I ask myself such questions all the time.

You you want a new map editor for Torque that you can use on your Mac? Yes.
Are you going to make it? Er...uh, no...
So you're going to use QuArK on a low-end PC, huh? Yes, yes...YES. DAMN ME FOR ASKING SUCH DIFFICULT QUESTIONS!

You don't want to hear how I figure out what to eat for lunch.
#2
11/30/2004 (12:50 pm)
Yes...it is fairly easy to do in Torque and only requires a couple of simple script changes (right mouse bind in /client/default.bind.cs) and the slot number for a 2nd weaponimage + a 2nd mount point on the other hand of the player model/animations.
#3
11/30/2004 (1:47 pm)
Yeah try matthews suggestion and then just change the eye offset
#4
11/30/2004 (6:11 pm)
I've recently been firing some twin Colt Peacemakers on the Range...:) I have no idea how it was done by our coder, he may drop by with some hints...so to me, it works. Reloading had some minor issues I think, but both pistols worked as 'duals'/twins. Definitely needs a new Node for 3rd person viewing...
#5
11/30/2004 (11:26 pm)
The project that Rex and I are working on has dual pistols, and it was a pretty easy thing to do. I was able to get it working pretty much right away. The harder part is making it work smoothly with your game's inventory/reloading/weapon switching systems.

You'll need a separate datablock for the left and right guns because they will need different mountpoints and offsets, and when you mount the images, you need to mount one into slot 0 and one into slot 1. Then you just need to bind the right mouse button to the other trigger, and you're set.

I could probably throw together a quick resource to add dual crossbow support to starter.fps if anyone's interested. I might not be able to get to it this week, though.
#6
12/01/2004 (9:34 am)
Thanks
#7
12/01/2004 (12:01 pm)
What about the "look" animation blending used to position the arms? It seems like you would need multiple animations describing the arm position for various gun configurations (i.e., one gun, two guns, or a two-handed rifle). It seems like you would need to hack player.cc to choose the appropriate arm/look animation for blending.
#8
12/01/2004 (12:22 pm)
There is support for different arm positions already in the engine. I know our player model has a rifle pose and a shotgun pose, and it switches between the two depending on the gun you are using. You would definately need another arm thread for the dual pistols, but I don't think it's something that would require any engine changes, just changes to the player model. Rex is working on a new player model right now, so I guess I'll find out soon enough. :)

As far as hacking it in to starter.fps, it would just have to be a first-person only type mod, because I wouldn't be able to add the animations to the orc without 3ds max.....well, and animation skill, and I don't have either at this point.
#9
12/01/2004 (12:45 pm)
A resource would be very helpful. I just got some weapons into an FPS and I want to try dual-weilding ASAP.
#10
12/02/2004 (3:06 pm)
Hmmm.....put mount nodes on each hand and when you pick up a weapon, use script to find out if a weapon is in the right hand (or left-whichever you prefer) and if there isnt, mount it there. Otherwise, mount it on the next node in the othr hand. When creating the script for the item, you can add something that defines wheter it will be deul-wielded or not. I havent tried it yet, but i hope it works. these are the directions to do it without TGE source code. I doubt it works, just give it a try.
#11
12/03/2004 (9:42 am)
I have this all set up in a stock starter.fps, I can probably post it soon
#12
12/03/2004 (2:44 pm)
Hmm, I still have the guy I used in GID7 (which I built from 3DGPAi1) so I'll add a second mount to his other hand and use that for 3rd person testing until a real artist comes along with a better model.

If I made an alien with four arms (Barsoom here we come!), do you think quad-wielding would be much more work? :)
#13
12/06/2004 (4:56 am)
Sounds real interesting. Viewing how you did that would light op my tunnels for sure Drew.
#14
12/06/2004 (9:03 am)
Ok, I have a sample together, but it's really not all that impressive. It allows you to pick up and use an additional crossbow. The trouble is that it attaches to the orc's face in third person view because his model doesn't have an appropriate mountpoint, and the crossbow is rather wide, so they are held pretty far apart in first person view.

I've been really busy with school lately (the semester is coming to an end) so I haven't had a chance to post it yet, but I'll get to it soon.
#15
12/06/2004 (9:14 am)
Our animator are hard on work these days on the hit box stuff. And he are going to add some extra mountpoints (hopefully) and some real cool animations.

Could be interesting swapping knowledge etc.
#16
12/07/2004 (5:49 am)
To actually get 2 weapons at the same time is really really easy. (It was done in Lore quickly, the hard part was all the weapon art we made for the upcoming Lore Gold release)

All I did was add a shapebaseimage to slot1, and there I go 2 weapons.
TGE defaults has mvTrigger0 and mvTrigger1 used to fire the shapebaseimages in 0 and 1 respectively (Player.cc updateMove() code). So theres little work to be done outside of art, and animation.
#17
04/06/2005 (10:30 am)
What if you wanted to have limitations to what could dual weild?

ps: not that torque savvy sorry for the noob question:)
#18
04/07/2005 (5:09 pm)
Boy, this is confusing.
#19
04/08/2005 (11:33 am)
I have tried this out and it just mounts both weapons to the same node.

I have something like this:
%player.setInventory(mesquito,1);
   %player.setInventory(mesquitoAmmo,10);
   %player.mountImage(mesquitoImage,0);

   //
   %player.setInventory(machinegun,1);
   %player.setInventory(machinegunAmmo,50);
   %player.mountImage(machinegunImage,2);

and my model has three mount points mount0, mount1, mount2
(mount0 and mount2 are the mounts that are connected to the hands.)
Not sure why this isn't working. I even opened my dts with show tool and it had all f the mount points.
#20
04/08/2005 (1:10 pm)
I think u have to make two datablocks

i.e.

copy the weapon you want to dual weild. go in the copied one and find the weapon image. scroll down more and you will see a varible(or whatever) that says mount.
change that for the left hand
Page «Previous 1 2