$collisiontext: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
  break { ragdoll mycustomgib2 health 10 fadetime 30 debris 1 burst 50 }
  break { ragdoll mycustomgib2 health 10 fadetime 30 debris 1 burst 50 }
  break { model mycustomgib3 health 10 fadetime 30 fademindist 20 fademaxdist 30 }
  break { model mycustomgib3 health 10 fadetime 30 fademindist 20 fademaxdist 30 }
  break { model mycustomgib4 health 10 fadetime 20 offset -2 3.68 12.4 }
  break { model mycustomgib4 health 10 fadetime 20 burst 128 offset -2 3.68 12.4 }
  }
  }


Line 21: Line 21:
: The (compiled) model to spawn.
: The (compiled) model to spawn.
; <code>offset <[[coordinates]]></code>
; <code>offset <[[coordinates]]></code>
: Offsets the current gib. Values are in [[unit]]s.
: Works in conjuntion with the 'burst' parametre. Sets the angle to launch the model once it is spawned.
; <code>health <[[int]]></code>
; <code>health <[[int]]></code>
: Overrides the model's own health value "This sometimes has to be placed in the [[$keyvalues]] line."
: Overrides the model's own health value "This sometimes has to be placed in the [[$keyvalues]] line."
Line 33: Line 33:
: Prevents the gib model from colliding with dynamic objects when made true. Strongly recommended for anything small.
: Prevents the gib model from colliding with dynamic objects when made true. Strongly recommended for anything small.
; <code>burst <int></code>
; <code>burst <int></code>
: Adds force to the gib, pushing it outward when the parent model breaks.
: Adds force to the gib, pushing it in the direction set in 'offset' when the parent model breaks. Unit of measure unknown. A value of 128 will launch a 1KG object roughly 2-3 metres.
: {{TODO|What units are in use here?}}
: {{TODO|What units are in use here?}}
; <code>placementbone <bone></code>
; <code>placementbone <bone></code>

Revision as of 15:56, 14 October 2009

$collisiontext defines a breakable model's custom gibs. (Generic gibs are defined by $keyvalues > prop_data > breakable_model).

Tip.pngTip:Use $autocenter when compiling custom gibs to fix potential lighting oddities.
Todo: Is propdata required when using $collisiontext?

Example

$collisiontext
{ 
	break { model	mycustomgib1	health 25	fadetime 0 }
	break { ragdoll	mycustomgib2	health 10	fadetime 30	debris 1	burst 50 }
	break { model	mycustomgib3	health 10	fadetime 30	fademindist 20	fademaxdist 30 }
	break { model	mycustomgib4	health 10	fadetime 20	burst 128	offset -2 3.68 12.4 }
}

Options

model <path\name>
ragdoll <path\name>
The (compiled) model to spawn.
offset <coordinates>
Works in conjuntion with the 'burst' parametre. Sets the angle to launch the model once it is spawned.
health <int>
Overrides the model's own health value "This sometimes has to be placed in the $keyvalues line."
fadetime <int|seconds>
Time before gibs start to fade away. They are removed once the fade is complete.
Todo: Is there any way to specify how long the fade should last?
fademindist <int|units>
fademaxdist <int|units>
Distance from the camera at which to start and end temporary fading out of the gib.
debris <bool>
Prevents the gib model from colliding with dynamic objects when made true. Strongly recommended for anything small.
burst <int>
Adds force to the gib, pushing it in the direction set in 'offset' when the parent model breaks. Unit of measure unknown. A value of 128 will launch a 1KG object roughly 2-3 metres.
Todo: What units are in use here?
placementbone <bone>
placementattachment <attachment>
Todo: Compared to $autocenter's "placementOrigin" ?

See also