$collisiontext: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
* {{todo| is [[propdata]] also required when using $collisiontext ?}}
* {{todo| is [[propdata]] also required when using $collisiontext ?}}


== QC syntax example ==
== QC Syntax Example ==
  [[$collisiontext]]
  [[$collisiontext]]
  {  
  {  
Line 15: Line 15:
  }
  }


==break options==
==Break Options==
===model===
 
* specifies the name of the .mdl to use as a gib.
Options highlighted in Red are mandatory.
===ragdoll===
 
* {{todo|'''guess''': specifies the name of a ragdoll model to break into, eg when zombies get cut in half ?}}
 
===offset===
===model ''<string>'' OR ragdoll ''<string>''===
===health===
 
* {{todo|compared to [[propdata]] health ?}}
* Location of *.mdl file to spawn. Note: Model must be compiled with ragdoll physics to use with "ragdoll".
===fadetime===
 
{{todo|guess: the time that passes before the gib fades}}
'''Example:''' "model" "props_junk/wood_pallet001a_chunka" OR "ragdoll" "props_junk/wood_pallet001a_chunka"
 
 
===offset ''<int int int>''===
 
* Offset model from its placementOrigin in inches with 3D co-ordinates (X Y Z).
 
'''Example:''' "offset" "8 8 32"
 
 
===health ''<int>''===
 
* Overide default base health values in $propdata.
 
'''Example:''' "health" "100"
 
 
===fadetime ''<int>''===
 
* Time that spawned gibs start to fade and disappear. Values should be specified in seconds.
 
'''Example:''' "fadetime" "30"
 
 
===fademindist ''<int>''===
 
* Distance from player to spawned model to start fading from view. Note: This must be used in conjunction with fademaxdist to work.
 
'''Example:''' "fademindist" "16"
 
 
===fademaxdist ''<int>''===
 
* Distance from player to spawned model to fade completely from view. Note: This must be used in conjunction with fademindist to work.
 
'''Example:''' "fademaxdist" "32"
 
 
===debris ''<boolean>''===
 
* Flag model as debris allowing full physical interaction between other gibs spawned. Stops spawned gibs from clipping each other but increases performance load.
 
'''Example:''' "fademaxdist" "1"
 
 
===burst ''<int>''===
 
* Adds a burst force allowing the gib to be pushed outward further.
 
'''Example:''' "burst" "50"
 


===fademindist===
===fademaxdist===
===debris===
===burst===
===placementbone===
===placementbone===
* {{todo|compared to [[$autocenter]]'s "placementOrigin" ?}}
* {{todo|compared to [[$autocenter]]'s "placementOrigin" ?}}
===placementattachment===
===placementattachment===
* {{todo|compared to [[$autocenter]]'s "placementOrigin" ?}}
* {{todo|compared to [[$autocenter]]'s "placementOrigin" ?}}

Revision as of 14:44, 16 January 2009

Stub

This article or section is a stub. You can help by expanding it.

The $collisiontext QC command is used to define a breakable model's custom gibset (generic gibs are defined by $keyvalues - prop_data - breakable_model).

Tip.pngTip:Use $autocenter to ensure gibs spawn in the correct position relative to the breaking model.
  • Todo:  is propdata also required when using $collisiontext ?

QC Syntax Example

$collisiontext
{ 
	break { "model" "mycustomgib1" "health" "1" "fadetime" "0" } 
	break { "model" "mycustomgib2" "health" "1" "fadetime" "0" } 
}

Break Options

Options highlighted in Red are mandatory.


model <string> OR ragdoll <string>

  • Location of *.mdl file to spawn. Note: Model must be compiled with ragdoll physics to use with "ragdoll".

Example: "model" "props_junk/wood_pallet001a_chunka" OR "ragdoll" "props_junk/wood_pallet001a_chunka"


offset <int int int>

  • Offset model from its placementOrigin in inches with 3D co-ordinates (X Y Z).

Example: "offset" "8 8 32"


health <int>

  • Overide default base health values in $propdata.

Example: "health" "100"


fadetime <int>

  • Time that spawned gibs start to fade and disappear. Values should be specified in seconds.

Example: "fadetime" "30"


fademindist <int>

  • Distance from player to spawned model to start fading from view. Note: This must be used in conjunction with fademaxdist to work.

Example: "fademindist" "16"


fademaxdist <int>

  • Distance from player to spawned model to fade completely from view. Note: This must be used in conjunction with fademindist to work.

Example: "fademaxdist" "32"


debris <boolean>

  • Flag model as debris allowing full physical interaction between other gibs spawned. Stops spawned gibs from clipping each other but increases performance load.

Example: "fademaxdist" "1"


burst <int>

  • Adds a burst force allowing the gib to be pushed outward further.

Example: "burst" "50"


placementbone


placementattachment