Author Topic: How to make dual handguns fire like in L4D and other shooters  (Read 575 times)

What exactly are the line(s) of code to make dual semi-automatic weapons fire one after the other?

The way the guns akimbo works is when you first click, it fires from image one, and when you release the mouse it fires from image two. It uses the stateName, stateTransitionOnTimeout, stateTransitionOnTriggerDown, and stateTransitionOnTriggerUp.

It's a pretty simple bit of code, just check out the guns akimbo left-handed image and right-handed image.

The way the guns akimbo works is when you first click, it fires from image one, and when you release the mouse it fires from image two. It uses the stateName, stateTransitionOnTimeout, stateTransitionOnTriggerDown, and stateTransitionOnTriggerUp.

It's a pretty simple bit of code, just check out the guns akimbo left-handed image and right-handed image.
Um, what images?

datablock ShapeBaseImageData(AkimboGunImage)
and.
datablock ShapeBaseImageData(LeftHandedGunImage)

You can find them both in the Weapon_GunsAkimbo.cs, near the end of the script.