$collisiontext: Difference between revisions
Jump to navigation
Jump to search
Tip:Use $autocenter when compiling custom gibs to fix potential lighting oddities.
(All of these are parsed as floats, not integers) |
(This one is also a float) |
||
| Line 22: | Line 22: | ||
; <code>health <[[float]]></code> | ; <code>health <[[float]]></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." | ||
; <code>fadetime < | ; <code>fadetime <[[float]]|seconds></code> | ||
: Time before gibs start to fade away. They are removed once the fade is complete. | : 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?}} | : {{TODO|Is there any way to specify how long the fade should last?}} | ||
; <code>fademindist <float|units></code> | ; <code>fademindist <[[float]]|units></code> | ||
; <code>fademaxdist <float|units></code> | ; <code>fademaxdist <[[float]]|units></code> | ||
: Distance from the camera at which to start and end temporary fading out of the gib. | : Distance from the camera at which to start and end temporary fading out of the gib. | ||
; <code>debris <[[bool]]></code> | ; <code>debris <[[bool]]></code> | ||
Revision as of 06:18, 26 December 2022
$collisiontext defines a breakable model's custom gibs. (Generic gibs are defined by $keyvalues > prop_data > breakable_model).
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 offset -2 3.68 12.4 }
}
Options
model <path\name>ragdoll <path\name>- The (compiled) model to spawn.
offset <Vector>- Offsets the current gib. Values are in units.
health <float>- Overrides the model's own health value "This sometimes has to be placed in the $keyvalues line."
fadetime <float|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 <float|units>fademaxdist <float|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 <float>- Adds force to the gib, pushing it outward when the parent model breaks.
Bug:Doesn't seem to work with small gibs, even at very large values. [todo tested in ?]- Todo: What units are in use here? Hypothetically this can be found out by using the parameter on a model and measuring how long a gib takes to go from it's spawning position to a point B. It's probably hammer units per second, though.
placementbone <bone>placementattachment <attachment>- Todo: Compared to $autocenter's "placementOrigin" ?
motiondisabled <bool>- Disables motion of gib if true.
multiplayer_break <string>- If set to
server, the gib will not be spawned by the client. If set toclient, the gib will not be spawned by the server. By default, both paths are allowed. velocity <Vector>- Applys velocity to the gib. Default is 0 0 0 (no velocity)