Prop dynamic: Difference between revisions
m (tidy & removed excess linkage) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=prop_dynamic}} | {{wrongtitle|title=prop_dynamic}} | ||
{{base_point}} | |||
== Entity description == | == Entity description == | ||
Line 14: | Line 15: | ||
Valves can be created by using a prop_dynamic with a valve model and covering the prop_dynamic with [[momentary_rot_button]]. Parent the prop_dynamic to the momentary_rot_button. | Valves can be created by using a prop_dynamic with a valve model and covering the prop_dynamic with [[momentary_rot_button]]. Parent the prop_dynamic to the momentary_rot_button. | ||
* See also [[Prop Types Overview]] | |||
* See also [[Prop Footsteps]] - A tutorial that provides essential code for when players walk on entities like this, it's not ignored during footstep sound computation. | |||
== Keyvalues == | == Keyvalues == | ||
Line 59: | Line 64: | ||
*'''OnOutOfWorld''' | *'''OnOutOfWorld''' | ||
:Fired whenever the entity leaves map boundaries. | :Fired whenever the entity leaves map boundaries. | ||
Revision as of 16:02, 12 April 2008
Template:Wrongtitle Template:Base point
Entity description
A prop that can be placed in hierarchy and can play animations. It can also be configured to break when it takes enough damage. Note that the health of the object will be overridden by the health inside the model, to ensure consistent health game-wide. If the model used by the prop is configured to be used as a prop_physics (i.e. it should be physically simulated) then it can not be used as a prop_dynamic. Upon level load it will display a warning in the console and remove itself. Use a prop_physics or prop_dynamic_override instead.
Notes
This entity cannot be moved on its own. However, it can be parented to a moving object such as a func_physbox.
For example, if you wanted to make the butcher knife in the props_lab folder into a knife you can actually pick up, you can create it as a prop_dynamic entity and parent it to an invisible func_physbox.
Modelled buttons can be used by covering a prop_dynamic button with a func_button, and then targeting the prop_dynamic with the SetAnimation input.
Levers can be used by covering a prop_dynamic with a func_rot_button. Parent the prop_dynamic to the func_rot_button.
Valves can be created by using a prop_dynamic with a valve model and covering the prop_dynamic with momentary_rot_button. Parent the prop_dynamic to the momentary_rot_button.
- See also Prop Types Overview
- See also Prop Footsteps - A tutorial that provides essential code for when players walk on entities like this, it's not ignored during footstep sound computation.
Keyvalues
- Template:Kv prop dynamic base
- Template:Kv parentname
- Template:Kv global
- Template:Kv enabledisable
- solid
- <choices> Collisions.
Literal value Description 0 Not Solid 2 Use Bounding Box 6 Use VPhysics
Flags
- BreakableProp:
- Break on Touch : [16]
- Break on Pressure : [32]
- Will break after being stood on for
PressureDelay
seconds.Note:Some models will break instantly if this is or isn't set. (e.g.
militiawindow02_breakable.mdl
,window_industrial.mdl
)
- 64 : Use Hitboxes for Renderbox
Inputs
- Template:I parentname
- Studiomodel:
- SetBodyGroup <integer >
- Set the model's body group.
- AlternativeSorting <boolean >
- Uses an alternative method for telling which objects are in front of others. Use if this object draws incorrectly when seen through transparent things.
- SetModelScale <string > (in all games since
) (also in
)
- Sets the model scale. Takes two values separated by a space. The first is the target model scale. The second value is the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly.
Warning:Negative or extremely high values can cause crashes!
Shadow:
- DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying EF_NOSHADOW.
- EnableShadow
- Turn dynamic shadows on for this entity.
- DisableReceivingFlashlight (in all games since
)
- This object will not receive light or shadows from projected textures.
- EnableReceivingFlashlight (in all games since
)
- This object may receive light or shadows from projected textures.
Reflection:
- DisableDrawInFastReflection (in all games since
)
- Turns off rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
- EnableDrawInFastReflection (in all games since
)
- Turn on rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
- DisableDraw (in all games since
)
- Add the EF_NODRAW flag to this entity. Some entities manage this on their own so be aware you can override that value.
- EnableDraw (in all games since
)
- Remove the EF_NODRAW flag from this entity. Some entities manage this on their own so be aware you can override that value.
- Template:I enabledisable
- SetAnimation <string>
- Force the prop to play an animation. The parameter should be the name of the animation.
- SetDefaultAnimation <string>
- Set the default animation (DefaultAnim) to the one specified in the parameter."
- SetBodyGroup <integer>
- Set the visible bodygroup, by index.
- TurnOn
- Make the prop visible.
- TurnOff
- Make the prop invisible.
Outputs
- Studiomodel:
- OnIgnite
- Fired when this object catches fire.
- OnAnimationBegun
- Fired whenever a new animation has begun playing.
- OnAnimationDone
- Fired whenever an animation is complete.
- OnOutOfWorld
- Fired whenever the entity leaves map boundaries.