Garry's Mod Icon GMod Thread

Custom Bullet Spread?

Greetings! 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.

Join the community!

Join GameBanana

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


Yttrium the Femtillionth avatar
Member Joined 2 years ago
1,403 points Ranked 3229th
8 medals 1 rare
  • Returned 1000 times Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon
  • Reached 1,000 Points Medal icon
  • 2016 Survey Participant Medal icon

Yttrium the Femtillionth
Send a Private Message to the submitter



Date Added
8 months ago
Jul 9 2016 @ 9:17am UTC
Date Updated
8 months ago
Jul 9 2016 @ 9:17am UTC