summoning/spawning a ragdoll.

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Fraz

New Member
Mar 15, 2003
8
0
0
Visit site
Is there a way to spawn a ragdoll that will stay there permenantly? One of the ones that your character switches to when you die. Or is there any mutators out there that allow the ragdoll to stay put when someone dies? Thanx!
 

Volt9000

New Member
Aug 28, 2002
43
0
0
I could be mistaken, but I think you would have to subclass the code that tells the ragdoll to "evaporate" after a while, and just keep it there permanently.
 

BinarySystem

Banned
Jun 10, 2004
705
0
0
It's quite possible. Try placing an actor subclass of some type, give it DrawType of DT_Mesh, Physics PHYS_KarmaRagdoll, and the appropriate Mesh. You will also need to give it an appropriate KParams.
 

Fraz

New Member
Mar 15, 2003
8
0
0
Visit site
BinarySystem said:
It's quite possible. Try placing an actor subclass of some type, give it DrawType of DT_Mesh, Physics PHYS_KarmaRagdoll, and the appropriate Mesh. You will also need to give it an appropriate KParams.

Yeah, i know how to do it this way. But what i want to do it to be able to spawn/summon an default ragdoll that appears when you die. Cos these have sound effects, and the default params seem to work much better for what i am wanting to do.
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
It is possible. But I don't recommend it. There is a reason why they dissapear and that is because each ragdoll takes a certain amount of resources and there is also a hardware limit on the number of ragdolls. In any case, subclass the xPawn and find the code which does the derez ...
 

BinarySystem

Banned
Jun 10, 2004
705
0
0
Actually the limit on the number of Ragdolls is somewhat optional. Creating them does not actually check to see if there are too many. There is a function that you can call that returns a boolean elling you if you have "too many," so you can "enforce" the limit within Unrealscript if you so desire. The xPawn code, for instance, checks this function. I've tried making ragdolls without checking that function and have had dozens of ragdolls without any problems. But you are right, having a ton of ragdolls everywhere does impact performance.
 

Max_Damage_uk

New Member
May 20, 2002
75
0
0
61
uk
Visit site
:rolleyes:

Yes, I made a quick mutator to have 24 ragdolls lying around. The maxragdolls in levelinfo of a map is set to 4.
Could'nt get it to work well in net play though. :mad:
 

Fraz

New Member
Mar 15, 2003
8
0
0
Visit site
Max_Damage_uk said:
:rolleyes:

Yes, I made a quick mutator to have 24 ragdolls lying around. The maxragdolls in levelinfo of a map is set to 4.
Could'nt get it to work well in net play though. :mad:

Do u have it uploaded anywhere? Id like to give it a try. Thanx!
 

dataangel

New Member
Apr 11, 2004
184
0
0
It is theoretically possible to change this though, is it not? I'm just guessing, but bTearOff is probably set to true for you when you die, then the client takes over simulating the ragdoll. Commenting out the line that does this would do the trick I think.
 

BinarySystem

Banned
Jun 10, 2004
705
0
0
You can't really replicate ragdoll movement. The reason is simply that there's a lot of information to pass (location, rotation, velocity, and "angular velocity" for every part of the ragdoll) and it's somewhat impractical to update that much information. It would be theroretically possible to simulate the ragdoll server-side, "harvest" information about it's position and stuff, and send it to the clients. However, because of the large bandwidth required for this it would probrably be somewhat choppy on the client-side.
 

BinarySystem

Banned
Jun 10, 2004
705
0
0
Well, the CPU hit of doing it in UScript would be no problem. Karma objects like vehicles are replicated through UScript. The issue is you simply have too much data to cram down the network with a reasonable number of updates per second.
 

dataangel

New Member
Apr 11, 2004
184
0
0
Couldn't you only replicate any forces that affect the ragdoll, and let the client simulate from there? So if a grenade goes off, the server would just send the position of where the ragdoll was, where the grenade exploded, and the magnitude of the force created. That seems like a pretty minimum amount of info.
 

BinarySystem

Banned
Jun 10, 2004
705
0
0
Yes, but due to latency, the ragdoll will not be simulated the same. For instance, if there's 200 ms latency, the ragdoll may have fallen down stairs for that 200 ms and thus been in a different position on the client when the client recieves the info about the grenade than the position it was in when the grenade event happened on the server.

Depending on what you want the ragdolls for, you might not have to replicate them at all. If they're non-colliding and just for show, maybe replication wouldn't be an issue.
 

dataangel

New Member
Apr 11, 2004
184
0
0
That's how it works now and I don't think replication is an issue for normal ut2k4.

Hmm... does the engine know how long it's been since the server sent it info? Because then you could use your ping to account for the latency difference. i.e. the servers says a force was applied when the ragdoll was here, the latency is X, simulate what the ragdoll went through in X and then start normal simulation again. I suppose that could still be stuttery though.
 

dataangel

New Member
Apr 11, 2004
184
0
0
I thought about this some mroe and I think the best way to replicate a ragdoll would be to spawn an invisible actor at the center of the ragdoll, and attach the ragdoll to it. The intricacies of the ragdoll movement would still be up to each client, but anyone hitting the invisible box actor would collide and thus appear to collide with the ragdoll.
 

poorsod

Londoner
Jul 16, 2004
2
0
0
london
www.nervousenergy.co.uk
The only way of spawning a ragdoll in a network game would be to recreate the ragdoll without using ragdoll physics, which is impossible to do without redevelpoing Karma itself, which would be quite hard.

It's just too complicated, there are so many factors governing the ragdoll and to recreate it would take up all the system's resources and everyone's computer would have to restart...
 

Max_Damage_uk

New Member
May 20, 2002
75
0
0
61
uk
Visit site
;)
Yes, i think this will be possible in a few years but atm it could destabilize the world economy, and have serious implications on the temperature and spin speed of my washing machine.

:eek:
 

dataangel

New Member
Apr 11, 2004
184
0
0
I still think the box idea would work fine, since I imagine any impact a ragdoll would have on gameplay would happen from it colliding with something. All it involves is replication of the center of the doll, which shouldn't be any more complicated than replicating the center of a pawn when hit by a rocket.