• Dead bodies getting nailed to props?
    15 replies, posted
I was wondering if there is a way of welding dead bodies to props with the crossbow just like getting nailed to the world with the crossbow
Are you asking for a stool? If so then use nail, if your asking if you can do it with a crossbow, wrong section.
Dead bodies have no physics, therefore cannot be "nailed". You can make a script to create a ragdoll which does have physics when someone dies, though, and that would automatically work with the nail tool.
So it's impossible to make dead bodies get nailed like in Half Life 2?
You can turn ragdolls on death on..?
Not in hl2, but in gmod it's possible using the way I said.
[QUOTE=Jackthemaster;21105584]So it's impossible to make dead bodies get nailed like in Half Life 2?[/QUOTE] In hl2 they have it coded so that if you hit them with the crossbow it will nail them to the wall, as well as Gmod, you just cant pick up their dead body and nail it somewhere, you could probably use rag morph for it tho.
[QUOTE=c-unit;21109815]In hl2 they have it coded so that if you hit them with the crossbow it will nail them to the wall, as well as Gmod, you just cant pick up their dead body and nail it somewhere, you could probably use rag morph for it tho.[/QUOTE] How the hell is ragmorph gonna help if I am making a combat mod? Bah. I probably just need to make a whole new swep for this with a nailing entity.
Just shoot a crossbow bolt at a NPC next to wall and BAM! Pinned dead body. Done it numerous times.
[QUOTE=Gbps;21105436]Dead bodies have no physics, therefore cannot be "nailed". You can make a script to create a ragdoll which does have physics when someone dies, though, and that would automatically work with the nail tool.[/QUOTE] Wrong. Dead bodies have several clientside physics objects which can be constrained, and that collide with also clientside physics objects. Pinning a dead body to a prop is trivial, and an example of this can be found in the Team Fortress 2 gamemode, where, although a bit buggy, the Huntsman can pin ragdolls to the wall.
[QUOTE=Jackthemaster;21115233]How the hell is ragmorph gonna help if I am making a combat mod? Bah. I probably just need to make a whole new swep for this with a nailing entity.[/QUOTE] So your making a combat mode where it will require that you pick up a dead body, move it near a wall, freeze it, then nail it and unfreeze it? I don't see any other way of just nailing them to the wall.
Omg you guys don't read do you? I said NAIL TO PROP. Not world. I know you can nail npc's to world. God...
You can adapt the Team Fortress 2's gamemode code :downs:
Oh, Gran, stop being so :downs:. :v: You can't do that, at least not clientside. Garry didn't implement Lua functions for creating clientside constraints, so you can't nail dead bodies to props. Now with serverside ragdolls, it's possible, you really just need to weld or ballsocket the desired bone from the desired ragdoll to the desired prop, no big deal. [editline]05:14PM[/editline] Oh, you need to alter the crossbow. I'd suggest hooking EntityTakeDamage and OnNPCKilled, and if a NPC dies from a crossbow bolt, retrieve the last damage info received in EntityTakeDamage, find out where the crossbow hit that NPC from, and do your nailing job. Is that really worth it though, who gives a damn about "combat mods", it just adds small details that get boring after a while, you shouldn't waste your time over obsolete stuff like that. I didn't see you release anything yet, but you seem to ask a bunch of various Lua questions, you should make something simpler but still fun, it doesn't have to be super awesome, but you shouldn't bother with overcomplicated and useless shit like that.
Yeah you are probably right, but I just like making stuff funnier but i guess actual nailing to the world is still something. Besides my gamemode isn't really gonna have props much, so I kinda start wondering why I even asked...But in any case, you are right. I haven't released anything and I'm suprised that someone moniters what I ask and expects.
Heh, if you're working on a gamemode, nailing to props isn't a detail you should bother with, at least not at this stage, because it doesn't really affect gameplay at all. Get all your main stuff to work properly, and then work on the fine details. [editline]10:04PM[/editline] Avoid serverside ragdolls, that's not something which is really recommendable for multiplayer servers, especially for a gamemode. I should really start writing that mail to Garry, there are a bunch of engine features that I need, including clientside constraints.
Sorry, you need to Log In to post a reply to this thread.