Run/Lowering Animation?

Hai, Ehm…

Yea, i’d really like to add the Running/Lowering animation to my next SWEP, The animation where the gun lowers when you run, and you are not able to shoot,or aim.

I am willing to show my code. I’m currently workin’ on a STG44/MP44

Other details please respond here :slight_smile:

  • Prune

Most lua weaponry with running animations run off of the same code that allows weapon ironsights.
Go open up a copy of Mad Cows weapons, And check out the RunArmPos, RunArmAng vectors in it, Then scroll down to find the code that disallows firing.
The RunArmPos and RunArmAng both work with SWEP:GetViewModelPosition(), Just like IronSightsPos and IronSightsAng, Assuming you know what those two are.
Once you have a full understanding on how those two work, Copy them over into your swep base, and use the tool below to find appropriate vectors for your weapon while running.
http://www.garrysmod.org/img/?t=dll&id=29787

As for the actual animation of the weapon while running, I would go tear apart the weapon base for Fight to survive: Stronghold
http://www.facepunch.com/threads/1131112

Do you want the weapon to lower on the world model? If so change the weapon’s holdtype on server and client.