Custom Bullet Spread?

A Forum Thread for Garry's Mod

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Yttrium the Femtillionth points.
  • Post: Give Yttrium the Femtillionth your thoughts on this Thread.
  • Flag: Alert moderators and warn members of a problem with this Thread.
  • Watch: Get notified when this Thread is updated.

Stop Lurking!

Sign up

Already a Bananite? Login

So basically, I'm working on something that I actually plan to release. Right now I'm trying to get purely horizontal bullet spray. None of that fancy TFA "WOAH, PRECALCULATED ACCURACY" shit. I already know that bullet.Spread is a vector value, but if I remove the Y value there's still vertical spray. Can anyone help me?

   -- Bullet properties
function SWEP:ShootBullet( damage, recoil, numbul, cone, bforce, btracer )

	numbul 	= numbul 	or 1
	cone 	= cone 		or 0.01

	local bullet = {}
	bullet.Num 		= numbul
	bullet.Src 		= self.Owner:GetShootPos()
	bullet.Dir 		= self.Owner:GetAimVector()
	bullet.Spread 	= Vector( cone, 0, 0 )
	bullet.Tracer	= 0
	bullet.Force	= bforce
	bullet.Damage	= damage
	self.Owner:FireBullets( bullet )
	if ( self.Owner:IsNPC() ) then return end
		self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
		self.Owner:SetAnimation( PLAYER_ATTACK1 )



None found


Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share


Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!



Date Added
1y tracking pixel