Anyway to set self.Owner:GetAimVector() into specific bounds?

This is for npc’s (not snpc’s, so i cant go around it in the ai’s code) im basically trying to get some control over npc’s fire spread… Tried everyway i know, cant say found a bugless way…
Anywho… Tried to math.clamp individual parts of the vector(later figuered that was a really dumb idea…) didn’t work.:saddowns:
I’m sure good ol’ facepunch knows the solution:raise:

Set their proficiency using

WeaponPrificiency only gives you 5 choices, even those are not that much different really…


Ok… so self.Owner:GetAimVector() is something like 0.09(00/50),0.95(00/50), 0.3(050/100). So i tried to do something like this:[LUA]ovx = math.Round(self.Owner:GetAimVector().x * 10)
ovy = math.Round(self.Owner:GetAimVector().y * 10)
ovz = math.Round(self.Owner:GetAimVector().z * 10)
bullet.Dir = Vector(ovx/10,ovy/10,ovz/10)[/LUA]and the result was really good accuracy… but… it snaps into 4 different places? O.o
Atleast im on the right track right?

I can tell you setting the proficiency to perfect would be a lot better

I kinda need something more precise than that and with more than 5 choices. Why is it so hard to launch a simple bullet from owner to the current enemy? :confused:


If the thing that you’re saying is the same which im thinking about then wouldint it point to specific area on the map instead of where its looking? If not… then i dont know what you mean :confused: