Garry's Mod

Garry's Mod

46 ratings
Dual-Acting Physgun
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Comic, Realism
File Size
Posted
Updated
17.732 KB
2 Aug, 2022 @ 2:24am
26 Aug, 2022 @ 11:35pm
2 Change Notes ( view )

Subscribe to download
Dual-Acting Physgun

Description
This addon has largely been inspired by Fasteroid's[github.com] original Wiremod E2 code.
You should check out Fasteroid's take[github.com], as it contains features that this addon lacks, such as grabbing the world to move yourself and generally having better prop movement.
You need PlyCore installed and PropCore enabled for the original E2 code to work, not this addon.

No noclip was used in the video above!
This addon allows you to use the physgun to reel yourself into props, prop-push yourself off the ground and even prop-fling yourself to great heights.
I've designed Mark I and Mark II versions of the system, with both using different techniques for applying forces.

You can view the source code of the addon here.[github.com]

Dual-Acting Physgun Mark I
This system simply uses Lua hooks to apply forces without interfering with the physgun's normal operations. This allows you to use the physgun normally, but changing the physgun beam length is likely to cause infinite pushing / pulling as the methods for retrieving the physgun beam length are inaccessible from Lua.
This is the version that I had teased over at the Knockout forums.

Dual-Acting Physgun Mark II
This system follows the original E2 code more closely. This system creates a ghost prop in front of the object you're actually manipulating, and adds forces to the real prop to follow the ghost, applying the opposite forces to the player.
This system allows the physgun beam length to be changed without issue, but it causes the physgun grab halo to be drawn incorrectly and certain props may spazz out when using this system. You can turn off the physgun grab halo in the context menu, under Drawing Options.

By default, the Mark II system is enabled and the Mark I system is disabled. You can turn Mark II off by typing "dual_acting_physgun_mk2_mul 0" in the console, and "dual_acting_physgun_mk1_mul 1" to turn Mark I on. Try not to have both Mark I and Mark II affect the same prop.
There are also other ConVars that start with "dual_acting_physgun_" that change how the systems behave.

I'm releasing this addon in the state it is now because I've lost my passion to develop this system anymore, so don't expect future updates. I want to go back and resume development of the other addons that I've made.



If you like my work, you have the option to donate on Ko-fi[ko-fi.com]
so that I can keep working on addons for another day. Every little bit helps!
7 Comments
kuzukuzu26 7 Dec, 2022 @ 10:35am 
GBBGGFBFGB
Fasteroid 10 Aug, 2022 @ 12:50pm 
godsend
garglenut 8 Aug, 2022 @ 2:11pm 
I see
idioticEd 7 Aug, 2022 @ 8:59pm 
Getting over it in gmod
Piengineer12  [author] 6 Aug, 2022 @ 10:51pm 
For it to be a separate weapon, I'd have to reimplement the whole Physgun completely in Lua, since its inner workings can't be accessed. At that point it would be worthy of being a separate addon.
garglenut 6 Aug, 2022 @ 5:04pm 
Why is it not a seperate weapon
nutdealer 5 Aug, 2022 @ 5:19am 
finally now i can play getting over it