Garry's Mod

Garry's Mod

No Player Collisions With NPC Ragdolls
37 Comments
general_stealth 22 Oct, 2024 @ 3:16pm 
can you make one to make npcs not collide with players and remove npcs that get stuck into player. especially vj base npcs. That would be great!
Ardisco 21 Jul, 2024 @ 9:53pm 
Can you also make this for npc dropped weapons😭
Kote 8 Jun, 2024 @ 12:55am 
If i kill combine with a car....is is colide?
𝐀𝐫𝐨𝐱𝐢 16 May, 2024 @ 1:04pm 
wdym
K1LLstealer 14 May, 2024 @ 4:30am 
how can i off this mod
K1LLstealer 14 May, 2024 @ 4:21am 
thank you now i cant kill any npc
Videogamexp 27 Apr, 2024 @ 7:02pm 
this work players too?
PORTABLE FRIDGE 23 Mar, 2024 @ 2:35pm 
polezno
MIK 29 Feb, 2024 @ 5:15pm 
literally me
$wagнул в портки 28 Feb, 2024 @ 2:54am 
literally "Better Keep Courpses mod" but with only one function
Coffee Man  [author] 27 Feb, 2024 @ 4:30pm 
:steamhappy:
Kepe Kon Kimmerman 27 Feb, 2024 @ 4:24pm 
it works.
Anonzie 27 Feb, 2024 @ 2:44pm 
Perfect for many HL2 custom campaigns where there's piles of dead combine soldiers and elites in your way :steamthumbsup::steamhappy:
roba moto taxis 27 Feb, 2024 @ 1:36pm 
genius words coming from a genius mod creator
Coffee Man  [author] 27 Feb, 2024 @ 1:06pm 
It works, unless it doesn't work, in which case, no it doesn't work, however if it happens to work, on that particular case, it will work.
Kepe Kon Kimmerman 27 Feb, 2024 @ 12:10pm 
does this work with zippys gore mod? if so, big ups.
That1d10tGuy 27 Feb, 2024 @ 11:34am 
Holy shit, thank you so much for creating this addon! Now I can finally play the Nova Prospekt maps with the Keep Corpses setting on; and, this addon has proven to be surprisingly very compatible with Hazama's Halo Flood addon (Infection Forms no longer end up killing themselves when trying to take over a body).
Coffee Man  [author] 27 Feb, 2024 @ 10:35am 
:steamhappy:
Homelander 27 Feb, 2024 @ 6:40am 
haha rubat goes brrr
thank you for the addon
swei_la98 27 Feb, 2024 @ 1:49am 
can u make a no collide with alive npcs?
galunga 27 Feb, 2024 @ 12:26am 
finally, I can keep ragdolls without getting caught on them
Can of Tuna 26 Feb, 2024 @ 6:44pm 
is it possible for you to add an option for ragdolls to still collide with NPCs? I just wanna kill combine soldiers with the corpses of their fallen comrades using the super gravity gun
Tums® 26 Feb, 2024 @ 5:21am 
duplication glitch
Reversepolius 26 Feb, 2024 @ 4:56am 
lol
Reversepolius 26 Feb, 2024 @ 4:55am 
>:)
Coffee Man  [author] 26 Feb, 2024 @ 4:55am 
Yours wins, I'm on my way.
Reversepolius 26 Feb, 2024 @ 4:54am 
Counter-Argument "come over here kiss me on my hot mouth im feelin romantical."
Coffee Man  [author] 26 Feb, 2024 @ 4:53am 
Counter-Argument: I will follow you home and kill your dog.
Reversepolius 26 Feb, 2024 @ 4:47am 
Behold the most niche and mostly useless addon there is
Coffee Man  [author] 26 Feb, 2024 @ 4:26am 
Now there's 41 of these.
Tums® 26 Feb, 2024 @ 4:25am 
THERES LIKE 40 OF THESE!!!!!!!!!!! But thanks :steamhappy:
Six 24 Feb, 2024 @ 4:15pm 
you're a fucking hero
Coffee Man  [author] 23 Feb, 2024 @ 3:22am 
You're using an incorrect Collision Group. The one that you're using is COLLISION_GROUP_PASSABLE_DOOR (aka 15), which only ignores players.

I used COLLISION_GROUP_WEAPON which ignores both players and active NPCs.

I also find it a bit redundant that you're checking if the entity is a prop_ragdoll when you're using the hook CreateEntityRagdoll, considering that hook is only called on situations when there's always a ragdoll anyway, so there's no need for the if prop_ragdoll check.
I4Q 22 Feb, 2024 @ 8:08pm 
And it perfectly disables all conflict from ragdolls specifically for the player. For the npc, nothing worked out for me. I even used the code as a basis NPC Ragdoll NoCollider V2 , but it does not work stably. It would be very nice if you could solve this problem
I4Q 22 Feb, 2024 @ 8:05pm 
@Coffee Man
After analyzing the addon code, I concluded that I cannot understand how it works, but it works -_-

I've been trying to disable collision for a long time for both the player and the npc, but there are some difficulties with the OnEntityCreated hook, which breaks or conflicts with CreateEntityRagdoll. My code for disabling player collision:

hook.Add("CreateEntityRagdoll", "CreateEntityRagdoll_RagdollCollision", function(owner, ragdoll)
if ragdoll:GetClass() == "prop_ragdoll" and ragdoll:IsValid() then
ragdoll:SetCollisionGroup(15)
end
end)

hook.Add("OnEntityCreated", "OnEntityCreated_RagdollCollision", function(ent)
if ent:GetClass() == "prop_ragdoll" and ent:IsValid() then
ent:SetCollisionGroup(15)
end
end)
Coffee Man  [author] 22 Feb, 2024 @ 10:12am 
:steamhappy:
Ezekiel 22 Feb, 2024 @ 10:06am 
yay now I can stop using the old shitty obsolete one
tanks:steamhappy: