Monster Stalker Physics help.

AcousticToad

Newbie
Joined
Jul 17, 2003
Messages
670
Reaction score
0
Not sure if this is a general editing question or a model and skins question, i'll put it here because it seems general, sorry if its in the wrong place.

Im in a bit of a bind here, I wanted to see what everyone was on about with the stalker firing a laser, but as everyone knows, when they're killed they crash the game. So I decompiled the model and gave it a collision model, but heres were my errors start:

1- New bones are not recognised
2- Parts of the pelvis stick to the arms - Not major, probably my fault.
3- Lower arms and lower legs stick through ground due to -1.

Other than that, he works good, can be killed without crashing the game and fires his laser, some animations need fixing, but im no animator so that will take time.

My major concern though is getting the arms and legs to collide properly, it looks weird folding its stumps up at the elbow. Ive tried adding more parts to the collision model but that failed, im guessing its part of the reference, but milkshape crashes because the model is warped so I cant add it there.

Heres a shot of whats happening. I did it in Garrys mod due to the ability to freeze bones, very good for testing, but the beam just goes through the lower parts of the arms and legs.

http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/stalker.jpg

Anyone got any help? It would be much appreciated.
 
Ahh, so it WAS because of a lack of a physics model. I always assumed so, but never got round to trying it.

A random guess - the bones don't have constraints or something - there's nothing telling the engine how far back the legs can bend, and stuff.
You need to fix the ragdoll.qci

From 'http://www.morales.dk/hl2/'

Ragdoll.qci


ragdoll.qci makes ragdoll constrains and limits between each connected bone
that we defined in bones.qci..

1. Create a file called ragdoll.qci in your smd folder.
The third line "$collisionjoints bug_ragdoll" tells hl2 which .smd file to use
as the ragdoll collision mesh.

$scale 1
$surfaceprop "flesh"

$collisionjoints bug_ragdoll {


$rootbone "joint1"
$concave

//you may need to adjust these values as i'm not sure
//what they do precisely.
$mass 100
$inertia 50
$damping 0.01
$rotdamping 1


$jointmassbias "joint1" 2.00

//limit : defines how much this joint can rotate on the x y and z axis
//( not sure what the last number does yet ).
$jointmassbias "joint2" 10.00
$jointconstrain "joint2" x limit -35.00 35.00 0.00
$jointconstrain "joint2" y limit -35.00 35.00 0.00
$jointconstrain "joint2" z limit -35.00 35.00 0.00

//copy this for all the joints you need
$jointmassbias "joint3" 10.00
$jointconstrain "joint3" x limit -35.00 35.00 0.00
$jointconstrain "joint3" y limit -35.00 35.00 0.00
$jointconstrain "joint3" z limit -35.00 35.00 0.00

2. Make a copy of xxx_ref.smd and rename it to xxx_ragdoll_pose.smd

3. Finally open your qc file and write the following at the end of the file :

$sequence ragdoll "bug_ragdoll_pose" FPS 1 activity ACT_DIERAGDOLL 1

Compile your model and see if it works in hl2.

-Angry Lawyer
 
Cool, thanks for that, I incorperated some of it into my ragdoll file, also found out that the calf bone and fore arm bone actually carried on down to the bottom of the model, a couple of extra boxes assigned to them fixed it. The incorperated text helped make the bones not seem so heavy.


This monster would have been so cool, its laser looks sweet, although it doesn't do any damage, and there doesn't seem to be a cvar for it, theres one for melee damage but it doesnt do melee attack, or move much for that matter, im guessing thats all to do in the code, which is beyond my ability.

Some pics:

http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0013.jpg
http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0014.jpg
http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0011.jpg
http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0010.jpg
http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0009.jpg
http://img.photobucket.com/albums/v215/acoustictoad/stalkertest/gm_construct0008.jpg
 
As it's missing its run and close assault animations, it does very little. If you were to implement a run animation, it'd keep heading for cover, and take pot shots. With a melee attack, it'd spank you.

Anyways, now I know it can be done, I'm off to recode it into my RTS.

-Angry Lawyer
 
That is the second most disturbing thing I've seen all day.
 
Back
Top