Physgun Parent Mode


Since I became a regular gmod player I went for some lua and this is one of the things I’ve done recently. Its nothing fancy but maybe helpful for a few people in here.

I made this for big contraptions that have more than 40 props, so when you for example want to lift it and move it around its all bouncy and nearly impossible to place it where you want it to be. So the solution is, Parenting.

All you have to do is bind some key with “+PhysgunParent” and all the props will be parented to the prop that you are currently holding with the Physgun.

Here’s some illustration:
Without Parenting:

With Parenting:


Yay, my first dropbox - Thanks again :slight_smile:

Btw If you don’t know how to use it then dont even bother to ask.

Wow this is nice
Great first post. No, seriously, most first posts are “XDXDXD LOLOLOLOL”


Would this work? If I unfroze a whole base (all welded), would it stay in it’s original frozen form?

This idea is great!

If I got you right then no. I was already thinking about adding some option to toggle this.

Need to check this out. Is this on metaconstruct?

Just tried it out works like a charm. This will be very useful… no more annoying prop spaz or lag while trying to move a large contraptions. Thank you for this.

Nvm, misread

I am actually surprised that nobody had made this before. It’s a very simple, yet very effective idea. Good work on this.

I have an idea: Return false on the PhysgunPickup for the first time, then parent all props to the physgunned prop, and return true the next time - that way you’ll be able to pickup contraptions as a whole without moving anything even an inch!

That is indeed a nice idea, however I would need to check how it reacts and if PhysgunPickup will be only called again if you leave the prop from pointing (In assumption of garry remembers the last checked entity)

PhysgunPickup fires immediately again when the last one returned false.
[lua]local lastgrab = nil

local function teststuff(ply, ent)
if ply:Nick() == ‘DrogenViech’ then

	if not lastgrab then
		lastgrab = ent
		print('pickup (1st time)')			
		return false
	elseif lastgrab then
		if ent == lastgrab then
			print('pickup (2st time)')
			return true
		lastgrab = nil
		return false

hook.Add(‘PhysgunPickup’, ‘teststuff’, teststuff)[/lua]