I was thinking of a useful tool that would change the properties of any prop or ragdoll to be able to unfreeze or unweld any prop or ragdoll it touches. It would be useful for videos where someone gets hit by something and falls down. Even if they were frozen or welded. If anyone could do this, I would appreciate it. :smile:
[lua]
function ENT:PhysicsCollide( data, physobj )
local ent = data.HitEntity
if (ent:GetClass() == "prop_physics" || ent:GetClass() == "prop_ragdoll") then
constraint.RemoveConstraints( ent, "Weld" )
physobj:EnableMotion( true )
end
end
[/lua]Not exactly sure on the unweld code since theres no documentation on the second parameter
The type of constraint, which is a "Weld".
[QUOTE=CptFuzzies;18086797]The type of constraint, which is a "Weld".[/QUOTE]
That was my guess but with garry you never know if it has some weird name written in 1337 speak or something
Oh shit i think i just gave him an idea...
Any progress? also I think the code from this might help
[url]http://www.garrysmod.org/downloads/?a=view&id=68271[/url]
It un-welds and changes the color of anything it touches. But its not exactly what I'm looking for.
Sorry, you need to Log In to post a reply to this thread.