Solved Dual Berettas Only Shooting ONE Gun!

Status
Not open for further replies.

LegendaryRyan

Active Member
Legacy
So you have 2 Berettas, so why are we only shooting one gun? Shouldn't we do something where it like, shoots both guns? Seems like I'm wasting an entire gun here!


No need to fear. Sticky Bandit is here!

Perhaps the iron sights should also like, zoom in the middle, so you're pointing both guns at the target instead of just one?

Anyway, I fixed the animation for you.


And here's the code.

Code:
--fixed iron sights
SWEP.IronSightsPos = Vector(0, -2.5, 1.25)
SWEP.IronSightsAng = Vector(0, 0, 0)

--0 = left hand, 1 = right hand.
SWEP.StickysBadassShootingAnimation = 0

--override the primary attack function
function SWEP:PrimaryAttack()
    --do fucking nothing if you're not supposed to be able to attack in the first place
    if not self:CanPrimaryAttack() then return end
    
    --call the OG
    self.BaseClass.PrimaryAttack(self.Weapon, worldsnd)
    
    --alternate the animation!
    vm = self.Owner:GetViewModel()
    if self.StickysBadassShootingAnimation == 0 then
        vm:SetSequence(vm:LookupSequence("shoot_left1"))
        self.StickysBadassShootingAnimation = 1
    elseif self.StickysBadassShootingAnimation == 1 then
        vm:SetSequence(vm:LookupSequence("shoot_right1"))
        self.StickysBadassShootingAnimation = 0
    end
    
end

Hit me up if you have any questions.

Here is the entire file. https://pastebin.com/B0T34umg
 
Status
Not open for further replies.
Top