So, I made a chair launching gun and I was thinking if I can make it launch three chairs but each of them in a different direction.
if (!SERVER) then return end; local ent = ents.Create ("prop_physics"); ent:SetModel (model_file); - ent:SetPos (self.Owner:EyePos() + (self.Owner:GetAimVector() 16)); ent:SetAngles (self.Owner:EyeAngles()); ent:Spawn(); local phys = ent:GetPhysicsObject(); local shot_length = tr.HitPos:Length(); phys:ApplyForceCenter (self.Owner:GetAimVector():GetNormalized() math.pow(shot_length, 3));
This is my current code for the single chair trajectory. I could do
SWEP.Primary.NumShots = 3
but then they’d all stick in each other while unable to move. Any ideas how to make it shoot one chair to the left, one in the middle and one on the right side?