Weapon with burst fire mode?

Ask questions, discuss ideas, get answers
Post Reply
hipnox
Posts: 68
Joined: Tue Aug 09, 2011 10:34 pm

Weapon with burst fire mode?

Post by hipnox »

Is it possible to attach a HandWeapon to another Handweapon, bind it to alt_Fire and have it consume the same ammo as the primary weapon/reload together?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Weapon with burst fire mode?

Post by Swaffy »

I remember asking something like this. Having two extra FireArms attached to the main HandFireArm set to fire at different intervals (fire delay set to: 0.0, 0.1, then 0.2) so that the player only has to 'tap' the fire button once, and three shots will be fired. Both FireArms and the HandFireArm are set to semi-automatic.

Well, this is as close as I got:
viewtopic.php?f=43&t=874

^ It is pretty much just an overheat function. No advanced stuff there.

- - - - - - - - - - - - - - - -

I have been wanting to play around with adding FireArms to HandFireArms for a while, but have been caught up in a mixture of Real Life and Soldier FOV settings.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Weapon with burst fire mode?

Post by Swaffy »

Because of a post by Apache Thunder, I'd like to bump this thread.
Apache Thunder wrote:
Swaffy wrote:So are you saying that I can fire two weapons at once when I click the left mouse button? For the longest time, I've been curious about adding one or two FireArms to a HandFireArm and set the to be fired when the main gun is fired.
Yes you can add firearms to handweapons and get them to fire projectiles. Just make sure the round of fire and ammo/mag counts match or else they may interfere with each other and you'll notice the handweapon not firing when it still has ammo left.
Okay, I tried it on my Colt just for testing purposes. The added FireArms (added to Colt Complex) doesn't seem to want to fire at the same time as the main FireArm. If I clicked a lot then the new FireArm would fire here and there as if it has a really low fire rate. Also, I took out the networkInfo. Do you have ideas that can help me while I keep messing with the code?


Here is some code. The mags, fire rate, and reload times match the normal colt FireArmsBundle along with a few other things.

Code: Select all

ObjectTemplate.create FireArms ColtFireArm1
rem ObjectTemplate.setnetworkableInfo PlaneFireArmInfo
ObjectTemplate.loadSoundScript Sounds/colt.ssc
ObjectTemplate.visibleBarrelTemplate e_MuzzGun
ObjectTemplate.setRotation 0/0.001/0.14
ObjectTemplate.projectileTemplate P38CannonsProjectile
ObjectTemplate.projectilePosition 0/0/0
ObjectTemplate.magSize 12
ObjectTemplate.numOfMag -1
ObjectTemplate.magType 0
ObjectTemplate.reloadtime 3.4
ObjectTemplate.velocity 300
ObjectTemplate.autoReload 1
ObjectTemplate.roundOfFire 1
ObjectTemplate.fireOnce 1
ObjectTemplate.AmmoType 1
ObjectTemplate.setMinDev 0.7
rem ObjectTemplate.setInputFire c_PIFire
ObjectTemplate.addRootSpeed 0
ObjectTemplate.fireInCameraDof 1
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Weapon with burst fire mode?

Post by Swaffy »

Okay, I figured out something. It seems like the added FireArm will only shoot when the primary FireArm is not. In other words, the added FireArms won't shoot at the same time as the primary. Is there a way around this?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply