Qc file for dynamic props

Got problems with your models? Struggling with textures? Get help with your custom assets.

Qc file for dynamic props

Postby Zee on Wed Jul 27, 2011 6:22 pm

I've been getting into creating model lately, I've made and compiled a few models, yet all have been compiled into static props and not dynamic. I've removed the $staticprop from the QC file, yet still, they're static props in the model viewer, but not dynamic (the check marks), and don't show in game when used with a prop_dynamic. For now, I've been using prop_dynamic_override, but i'm sure there's a more valid way.

I've Googled, but couldn't really find anything. Most of the things I found are tutorials about compiling your first prop, all static. Same for Qc templates. I thought it would just compile as one without $staticprop, but i was wrong. I'm sure there's something stupid I'm missing.

Thanks in advance. Sorry if this was asked before, but i looked to no avail.
Zee
Member
Member
 
Joined: Wed Jul 28, 2010 7:23 am

Re: Qc file for dynamic props

Postby Stormy on Fri Jul 29, 2011 7:00 am

If you want to compile a physics prop you need to put in the $keyvalues {prop_data} block to define the physics behaviour. You have to provide parameters like mass, inertia and damping before the engine will recognise it as a prop_physics. http://developer.valvesoftware.com/wiki/$keyvalues

I can't remember ever having to provide anything to compile specifically for prop_dynamic, but I've been compiling with staticprop for the last few months so I'm a bit rusty. I'm pretty sure that any props with bones (animated models or ragdoll models) can be used with prop_dynamic as well.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Qc file for dynamic props

Postby crazycarl on Sat Jul 30, 2011 3:21 am

There's nothing special you have to do to make a prop_dynamic. $staticprop should be okay. As long as you don't have prop_data physics info, it should work.

Check for any errors in the console when you run the map.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Qc file for dynamic props

Postby Zee on Sat Jul 30, 2011 7:08 am

K thanks guys, A double check my qc file, and it does have prop_data. I looked at a template QC and thought it was something else. Sorry for the simple question.
Zee
Member
Member
 
Joined: Wed Jul 28, 2010 7:23 am

Re: Qc file for dynamic props

Postby crazycarl on Sun Jul 31, 2011 5:41 pm

For future reference: prop types are defined like this:

  • prop_data makes the prop usable with prop_physics and prop_ragdoll, but nothing else. The prop_physics _override entity lets you input custom prop_data from Hammer.
  • $collisionjoints enables ragdolling, but I don't believe having it or not having it makes a difference on what entity you can use it with.
  • $staticprop collapses all bones and animations. It is required for prop_static and prop_detail, but having it does not disqualify the model from any other use.
  • prop_detail must only use the unlitgeneric shader for its textures.
  • prop_dynamic only requires that there's no prop_data in the model. prop_dynamic_override tells the game to ignore this requirement.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Qc file for dynamic props

Postby Mr. Happy on Sun Jul 31, 2011 6:13 pm

Here is my basic dynamic prop template:

Code: Select all
$modelname   "\props_<model-dir>\<model-name>.mdl"
$body body   "<model-ref>.smd"

$surfaceprop   <surface-prop>
$cdmaterials   "models\<material-dir>"

$sequence idle   "<model-ref>.smd" loop fps 15

$collisionmodel   "<collision-file>.smd"
{
//$concave
}


EDIT: I should learn to read so I can realize he already got it working, but I'll leave this here anyway.
Image
-You've just been happified!?
User avatar
Mr. Happy
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sat Dec 30, 2006 9:20 am
Location: Flyin' thru "da cloud" in the MotherShip

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users