setWeaponLink for vehicles?
setWeaponLink for vehicles?
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™
Re: setWeaponLink for vehicles?
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...
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...

Re: setWeaponLink for vehicles?
Doesn't FH simply use c_PIPitch to "rotate" the kind of barrel they want to use?
- Vilespring
- Posts: 740
- Joined: Sat Nov 24, 2012 5:47 am
- Location: Somewere in the United States
Re: setWeaponLink for vehicles?
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/

"I didn't steal your pizza"
Area 51: http://battlefieldarea51mod.weebly.com/

"I didn't steal your pizza"
Re: setWeaponLink for vehicles?
Okay, thanks.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: setWeaponLink for vehicles?
There may be a command for this. I noticed this command is enabled for both fireArms and HandFireArms:
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.
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.



I have cameras in your head!