setWeaponLink for vehicles?

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

setWeaponLink for vehicles?

Post by Swaffy »

I know how to use setWeaponLink for HandFireArms, but is there a way to link vehicle guns? So the secondary gun will share ammo with the primary gun...
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: setWeaponLink for vehicles?

Post by Senshi »

Hmmmm. I'm not sure, but you could try and check the FH Flak18. It uses a weird selector system for ammo, but I really can't remember if it's two different ammo pools (AP and HE) or if the selector is just to switch between long range and air burst (timetolive) projectile mode, but uses the same ammo.

I really haven't dabbled with this in a long time, and even worse: I work on BF2 now, so I often think functions existed back in BF42 that only were added in BF2... :?
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: setWeaponLink for vehicles?

Post by dudejo »

Doesn't FH simply use c_PIPitch to "rotate" the kind of barrel they want to use?
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: setWeaponLink for vehicles?

Post by Vilespring »

yes, it has 3 guns, one that is the muzzle flash effect, which fires a fake projectile. It stays in place. There are 2 guns that fire different projectiles, with no muzzle effect. These guns are either pointed at the target, or at the ground. I think it's the ground, any ways.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: setWeaponLink for vehicles?

Post by Swaffy »

Okay, thanks.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: setWeaponLink for vehicles?

Post by Apache Thunder »

There may be a command for this. I noticed this command is enabled for both fireArms and HandFireArms:

Code: Select all

ObjectTemplate.weaponLink

SetWeaponLink also works on both. But the itemIndex command that defines what id each Handweapon goes on, doesn't work on a vehicle firearm. Perhaps the GUIIndex command can be used for this (What does the GUIIndex command do anyway? I see it used everywhere, but it has no notable impact on the HUD the weapon or PCOs they are used on. In BF2, they are used to define what crosshair/HUD textures from the menu archive are used. But their function in BF1942 appears to be entirely different.

You can try this on a vehicle weapon, but I don't know if it will function the same since you can't set an index to vehicle fireArms and the SetWeaponLink command uses index to determin what weapons to link to.
ImageImageImage
I have cameras in your head!
Post Reply