Hello, I know this a repeat of a question I had in the Newbie Questions Forums but with a few exceptions nobody over there was helpful. I need a SWEP that shatters all glass within a 30 foot radius without explosions or harming players. It doesn’t need to be dramatic it just had to break. One of the few helpful posters gave me this code:
for k, v in pairs( ents.FindInSphere(self.Owner:GetPos(), 30*HOW MUCH IS A FEET IN UNITS) ) do if( v:GetClass() == "func_breakable")then v:Fire("shatter"); end; end;
but I still have a few questions.
Where does it go? The Primary Attack Function or somewhere else?
I’ve found the units I’ll use (270) and I want to know do I replace just HOW MUCH IS A FEET IN UNITS or the whole 30*HOW MUCH IS A FEET IN UNITS?
Any Help Is Appreciated