Template:I DynamicProp: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added new input)
(More inputs from Portal 2)
Line 2: Line 2:
; <code>SetAnimation <[[string]]></code>
; <code>SetAnimation <[[string]]></code>
: Force the prop to play the named animation.
: Force the prop to play the named animation.
{{IO|SetAnimationNoReset|Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.|param=string|since=AS}}
; <code>SetDefaultAnimation <string></code>
; <code>SetDefaultAnimation <string></code>
: Change the animation played when not in a random/forced sequence.
: Change the animation played when not in a random/forced sequence.
Line 15: Line 14:
; <code>DisableCollision</code>
; <code>DisableCollision</code>
: Control collisions with the prop.
: Control collisions with the prop.
{{IO|SetAnimationNoReset|Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.|param=string|since=AS}}
{{IO|BecomeRagdoll|Change into a ragdoll immediately.|since=P2}}
{{IO|FadeAndKill|Fade out then remove this prop.|since=P2}}
{{ScrollBox|
{{ScrollBox|
{{I Studiomodel}}
{{I Studiomodel}}

Revision as of 00:49, 18 May 2011

SetAnimation <string>
Force the prop to play the named animation.
SetDefaultAnimation <string>
Change the animation played when not in a random/forced sequence.
SetPlaybackRate <float>
Set the framerate at which animations are played.
SetBodyGroup <int>
Set the index of the visible $bodygroup.
TurnOn
TurnOff
Control the prop's visibility.
EnableCollision
DisableCollision
Control collisions with the prop.
SetAnimationNoReset <string> (in all games since Alien Swarm)
Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.
BecomeRagdoll  (in all games since Portal 2)
Change into a ragdoll immediately.
FadeAndKill  (in all games since Portal 2)
Fade out then remove this prop.
Studiomodel:
Skin <integer>
Changes the model's skin to the specified number.
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 Alien Swarm) (also in Source 2013)
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.pngWarning: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 Portal 2)
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (in all games since Portal 2)
This object may receive light or shadows from projected textures.

Reflection:

DisableDrawInFastReflection  (in all games since Portal 2)
Turns off rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
EnableDrawInFastReflection  (in all games since Portal 2)
Turn on rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
ToggleDraw:
DisableDraw  (in all games since Portal 2)
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 Portal 2)
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 BaseFadeProp BreakableProp:

Break
Breaks the breakable.
SetHealth <integer>
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealth <integer>
Adds health to the breakable.
RemoveHealth <integer>
Removes health from the breakable.
physdamagescale <float>
Sets Physics Impact Damage Scale. 0 means this feature is disabled for backwards compatibility.
EnablePhyscannonPickup
Makes the breakable able to picked up by the gravity gun.
DisablePhyscannonPickup
Makes the breakable not able to picked up by the gravity gun.
EnablePuntSound  (in all games since Half-Life 2: Episode One)
Allow this prop from playing its Punt Sound sound when punted by the gravity gun.
DisablePuntSound  (in all games since Half-Life 2: Episode One)
Prevent this prop from playing its Punt Sound sound when punted by the gravity gun.

RenderFields:

Alpha <integer 0–255>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its rendermode set to a number other than 0.
Color <color255>
Sets an RGB color for the entity.
Parentname:
SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.