I am currently making a weapon that is essentially the gravity gun, but it replaces the right click ability to spawn a object rather then pull it. The problem I am having is that I don’t know the code or proper way to make the primary fire use the gravity gun’s punting ability to shoot said object.
The original Gravity Gun code is in C++ and so the original code would not be useful for you.
One way you can do this, is to set the force on the ‘bullets’. Take a look at this http://wiki.garrysmod.com/page/Structures/Bullet
Another way is to use a trace, to get the object you want to push, and then use this
Alright, i’ll take a look at it and see what I can do. Thanks.