Daul Wield
by Riley!!!! · in General Discussion · 09/28/2005 (7:24 am) · 12 replies
I know how to do daul wielding in a TGE game. No modify required.
In the weapon image function of your weapon, there will be something like mountnode. Change it to ChooseMount();
At the end of the file, type:
function chooseMount(%this, %obj)
{
if (obj.getMountedWeapon)
{
this.mountNode = 0;
}
else
{
this.mountNode =
}
};
If theres something in slot one, move to the next one. Just place Mount0 on your player models right hand, and Mount1 on its left. Put an alternate fire button in your control list (client.cs or something....dont remember)
My friend (Bryce Carrington) is putting together a weapon pack for garagegames ($5.00 including the scripts and images) and this dual wield code will be included.
Ur going to need animations for your player holding two guns instead of one, so DO IT!!!!! HAHAHAHAHAHAHAHAHA!!!
p.s. I think its sad how some pay $100 to get the source code when they can just do this...just kidding.
In the weapon image function of your weapon, there will be something like mountnode. Change it to ChooseMount();
At the end of the file, type:
function chooseMount(%this, %obj)
{
if (obj.getMountedWeapon)
{
this.mountNode = 0;
}
else
{
this.mountNode =
}
};
If theres something in slot one, move to the next one. Just place Mount0 on your player models right hand, and Mount1 on its left. Put an alternate fire button in your control list (client.cs or something....dont remember)
My friend (Bryce Carrington) is putting together a weapon pack for garagegames ($5.00 including the scripts and images) and this dual wield code will be included.
Ur going to need animations for your player holding two guns instead of one, so DO IT!!!!! HAHAHAHAHAHAHAHAHA!!!
p.s. I think its sad how some pay $100 to get the source code when they can just do this...just kidding.
#2
09/28/2005 (10:23 am)
When will the weapon pack be with us?
#3
-Max
09/28/2005 (10:46 am)
My god.... Modders have come back to haunt us all with their false hopes, and broken dreams.. Not to say that by modding you can't learn.. It's just that I blelieve some people need to be less, ignorant shall we say.-Max
#4
09/28/2005 (1:37 pm)
Dual...it's dual wield. And if all you need to support dual wielding in a game is about 8 lines of script code, than Torque is powerful indeed.
#5
if (obj.getmountedimage !$= ""){
that would work much better if not actually work. oh and the ";" on the last bracket would mess it up. Come on Riley this doesn't work at all :(.
09/28/2005 (2:27 pm)
There is a dual wielding resource out there it needs some work but people with Scripting experience should be able to fix it up. Oh and Riley's code doesn't work seeing that there is no way to fire that weapon and the if statement is done incorrectly. I would do it like if (obj.getmountedimage !$= ""){
that would work much better if not actually work. oh and the ";" on the last bracket would mess it up. Come on Riley this doesn't work at all :(.
#6
09/28/2005 (3:13 pm)
Hey, I'll offer to produce some sequences[look* & *_recoil] with the DTSPlus! rig if someone can put together a Resource that does this...I'd love to get a true dual wielding weapoins working; since I have a ton of pistol weapons.
#7
09/28/2005 (4:10 pm)
I got a good dual wielding code in my game give me a day to work out the kinks and I'll post a resource.
#8
09/29/2005 (9:26 am)
Weapon pack is in the works. Models are done, scripts are being worked on. Maybe a few months, dont know for sure. Gotta ask him.
#9
09/29/2005 (9:41 am)
I could make a dual wielding root anim to go with that Treb if you'd like.
#10
09/29/2005 (10:48 am)
@Treb, I am interested in how you do it. I am not that experienced in scripting, but I cannot get my implementaion to work.
#11
The code is very simple.
But, TGE does not ship with a .DTS model that has a left hand mount point.
You will need to use a little hack found in the link above or use a custom character.
The hack will allow you to "fudge" a body part into a mount point.
I suggest using the Show Tool to find out what body part you want use.
Honestly, a custom character model is the only way to go.
There is the Blue Guy model for 3DSMax and the Green Guy for Milkshape if you need somewhere to start.
Also, before you head down this path, I suggest thinking very deeply about how your interface will work.
Just as an example: How would you handle reloading or changing weapon modes when holding an Uzi in one hand and a crossbow in the other?
Dual (or more) weapons are cool, but it really comes down to the interface.
Best of luck.
Ari.
*Edit: The hack for making a mount point is actually in the Melee combat resource:
However, this is an engine hack, and an ugly way to do it.
10/02/2005 (8:30 pm)
@Riley if you haven't, check here.The code is very simple.
But, TGE does not ship with a .DTS model that has a left hand mount point.
You will need to use a little hack found in the link above or use a custom character.
The hack will allow you to "fudge" a body part into a mount point.
I suggest using the Show Tool to find out what body part you want use.
Honestly, a custom character model is the only way to go.
There is the Blue Guy model for 3DSMax and the Green Guy for Milkshape if you need somewhere to start.
Also, before you head down this path, I suggest thinking very deeply about how your interface will work.
Just as an example: How would you handle reloading or changing weapon modes when holding an Uzi in one hand and a crossbow in the other?
Dual (or more) weapons are cool, but it really comes down to the interface.
Best of luck.
Ari.
*Edit: The hack for making a mount point is actually in the Melee combat resource:
Quote:Theres an engine edit that will enable you to use slot 31 for a shield. In shapebase.cc replace:
mountPointNode[AIRepairNode] = shape->findNode("AIRepairNode");
with
mountPointNode[AIRepairNode] = shape->findNode("Bip01 L Forearm");
Josh Moore
However, this is an engine hack, and an ugly way to do it.
#12
10/06/2005 (8:48 pm)
I did put up a resource but the GG guys are busy and sometimes they take a while to publish it.
Torque Owner Jonathan Rose