Game Development Community

Strangeness with Ragdolls

by Aleksander Elvemo · in Game Mechanics Kit · 09/22/2009 (1:34 pm) · 5 replies

Hi there!

I succesfully implemented the physics part of GMK into my T3D Beta5 build, and ive got ragdolls ingame.
However, when i spawn multiple "spaceorc" bots and i kill them, only the first bot make a ragdoll, the oters simply vanish, with these console errors:

Unable to find object: '0' attempting to call function 'initRagDoll'

Why does this happen to every bot except the first one?

#1
09/25/2009 (1:07 pm)
Hi Aleksander,

Is that problem appears in the "Orcs Rule" demo?
Which version of GMK are you using 1.2.3 or 1.2.4?






#2
09/25/2009 (1:12 pm)
Hi!
I'm using 1.2.3!
No actually i have only added the sourcepart of the physics(bullet) and copied the scriptfolder logickingMechanics into mine server/scripts.

I didnt copy any other files since i thought i got it to work with only those changes.

So I just start a mission, drop in a couple of bots then kill them. The first one becomes a ragdoll, while the other following ones does not.
#3
09/25/2009 (1:18 pm)
Please email me logicking@logicking.com and I will send you link for a 1.2.4 version.

There are precompiled exe's for bullet physics library.
#4
09/25/2009 (1:57 pm)
If anyone wanders into the same problem, i kinda fixed it with this:
in function

function createRagDoll(%ragdollData, %obj)

You'll find this:
%ragDoll_obj = new RagDoll(%obj.getName() @ "_ragDoll") {

change into this:
%ragDoll_obj = new RagDoll(){
#5
09/30/2009 (6:29 pm)
@Aleksander
Good spot! If AI's got same names ragdolls won't spawn correctly.