User:Nescius/sandbox/test9
![]() |
---|
CBaseAnimating |
![]() baseanimating.cpp
|
See also: Category:CBaseAnimating
CBaseAnimating
is the C++ class from which all entities with models inherit, even if they don't actually move.
This category also covers CBaseAnimatingOverlay
, which provides animation blending.
![Icon-Important.png](/w/images/thumb/5/5c/Icon-Important.png/10px-Icon-Important.png)
Keyvalues
- World Model
(model)
<test> - The model this entity should appear as. 128-character limit.
- Skin
(skin or ModelSkin
<test>)
- Some models have multiple skins. This value selects from the index, starting with 0.
- Collisions
(solid)
<test> - Method of collision for this entity.
|
- Hitbox Set
(hitboxset)
<test> !FGD - Sets the
$hboxset
to use. - Body Group
(body or SetBodyGroup)
<test> !FGD - Sets the the active
$bodygroup
. - Model Index
(modelindex)
<test> !FGD - Given the number index from dumping the
cl_precacheinfo modelprecache
table, sets entity model to the index.Warning:If an entity has animations that will be played, then the set model also must have its own sequences, else the game crashes.
- Model Scale
(modelscale)
<test> (in all games since EP2) - A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however.
Warning:Negative or extremely high values can cause crashes!
Note:Scale may not appear in
Hammer 4.x, but will appear in-game (tested in
). This is fixed in
Hammer++.
Animating
- Sequence
(sequence)
<test> !FGD - Default animation sequence for the model to be playing after spawning.
- Playback Rate
(playbackrate)
<test> !FGD - A multiplier of the framerate at which animations are played, negative values are accepted. Default is 1.0.
- Cycle
(cycle)
<test> !FGD - The current frame of the current animation, on a range from 0-1.
- Texture Frame
(texframeindex)
<test> !FGD - The initial frame number for all animated textures on this entity.
Effects - Render
- Start Fade Distance
(fademindist)
<test> - Distance at which the entity starts fading. If 0 or less, the entity will disappear instantly when end fade is hit. The value will scale appropriately if the entity is in a 3D Skybox.
- End Fade Distance
(fademaxdist)
<test> - Distance at which the entity ends fading. If 0 or less, the entity won't disappear at all. The value will scale appropriately if the entity is in a 3D Skybox.
- Fade Scale
(fadescale)
<test> - If specified in the
worldspawn
, or if the engine is running below DirectX 8, entities will fade out even if the fade distances above aren't specified. This value gives more control over when this happens: numbers smaller than 1 cause the entity to fade out at further distances, and greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also$noforcedfade
. - FX Amount/Transparency (0–255)
(renderamt)
<test> - Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
- Render Color (R G B)
(rendercolor)
<test> - Color tint.
- Render FX
(renderfx)
<test> - Various somewhat legacy alpha effects.
![]() ![]()
|
- Render Mode
(rendermode)
<test> - Set a non-standard rendering mode on this entity.
Effects - Environment
- Disable Shadows
(disableshadows)
<test> - Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
- Disable Receiving Shadows
(disablereceiveshadows)
<test> - Prevent the entity from receiving shadows on itself.
- Shadow Cast Distance
(shadowcastdist)
<test> - Sets how far the entity casts dynamic shadows. 0 means default distance from the
shadow_control
entity. - Lighting Origin
(LightingOrigin)
<test> - Select an entity (not
info_lighting
!) from which to sample lighting instead of the entity's origin.
Lighting Origin Offset(not in(LightingOriginHack)
<test>) !FGD
- Deprecated The
info_lighting_relative
from which to sample lighting instead of the entity's origin. Use Lighting Origin instead.
- Disable Flashlight
(disableflashlight)
<test> (in all games since P2) - Used to disable projected texture lighting and shadows on this entity. Identical to EF_NOFLASHLIGHT.
- Disable ShadowDepth
(disableshadowdepth)
<test> (in all games since P2) - Makes this entity not cast a shadow from
env_projectedtexture
entities. Identical to EF_NOSHADOWDEPTH. - Projected Texture Cache
(shadowdepthnocache)
<test> (in all games since P2) - Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead. Identical to
EF_SHADOWDEPTH_NOCACHE
.- 0: Default
- 1: No cache—render every frame
- 2: Cache it—render only once
Miscellaneous
- Glow Backface Multiple
(glowbackfacemult)
<test> (only in) !FGD
- If this object has a glow effect, multiply the effect by this much on the sides of the object that are facing away from the viewer.
- Move Type
(MoveType)
<test> (in all games since) !FGD
- Sets a movetype for this entity, which changes its movement behavior.
|
- Collision Group
(CollisionGroup)
<test> (in all games since) !FGD
- Sets a collision group for this entity, which changes its collision behavior.
|
- No Animation Sounds
(SuppressAnimSounds)
<test> (in all games since P2) !FGD - Silences sounds linked to animations.
DXLevelChoice:
- Minimum / Maximum DX Level
(mindxlevel / maxdxlevel)
<test> (removed since)
- The entity will not exist if the engine is running outside the given range of DirectX Versions.
![]()
|
SystemLevelChoice:
- Minimum / Maximum Effect Details Level
(mincpulevel / maxcpulevel)
<test> (in all games since)
- Don't render for players with Effect Details levels that exceed the minimum or maximum.[
Key names are related to
cpu_level
cvar used by Effect Details.]
|
- Minimum / Maximum Shader Details Level
(mingpulevel / maxgpulevel)
<test> (in all games since)
- Don't render for players with Shader Details levels that exceed the minimum or maximum.[
Key names are related to
gpu_level
cvar used by Shader Details.]
|
Inputs
skin
<test>- Selects a skin from the model's index, starting with 0.
SetBodyGroup
<test>- Sets the the active
$bodygroup
. Ignite
- Makes the entity catch on fire indefinitely.
IgniteLifetime
<test>- Makes the entity catch on fire for a given amount of time.
IgniteNumHitboxFires
<test> (removed since)
- Makes the entity catch on fire with a given number of hitbox fire particles. Does not function correctly in
onward.
IgniteHitboxFireScale
<test> (removed since)
- Makes the entity catch on fire with a given scale for hitbox fire particles. Does not function correctly in
onward.
BecomeRagdoll
- Kills the entity and creates a client-side ragdoll from the model. Input is only passed if the model contains
$collisionjoints
. For other models,phys_convert
can be used instead. SetLightingOrigin
<test>- Sets the entity's lighting origin to use this entity's position.
(removed sinceSetLightingOriginHack
<test>)
- Deprecated Offsets the entity's lighting origin by their distance from an
info_lighting_relative
. UseSetLightingOrigin
instead. fademindist
<test>- Sets distance at which the entity starts fading. If <0, the entity will disappear instantly when end fade is hit. The value will scale appropriately if the entity is in a 3D Skybox.
fademaxdist
<test>- Sets distance at which the entity ends fading. If <0, the entity won't disappear at all. The value will scale appropriately if the entity is in a 3D Skybox.
SetModelScale
<test> (only in)
- Multiplies the size of the model. Does not alter the physics collisions in most cases. Can take two values separated by a space, in which case the first value would be the target model scale and the second value would be the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly.
Tip:The
modelscale
keyvalue can be AddOutputed as a workaround for other games with this input missing.
![Warning.png](/w/images/thumb/c/cb/Warning.png/10px-Warning.png)
SetCycle
<test> (only in)
- Skip to a specific point in the current animation.
SetModel
<test> (only in)
- Changes the model to the specified path. Form of models/ammo/ammo_us.mdl.
![Icon-Important.png](/w/images/thumb/5/5c/Icon-Important.png/10px-Icon-Important.png)
SetPlayBackRate
<test>- Change the animation speed multiplier.
Alpha
<test>- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than 0.
AlternativeSorting
<test>- Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.
Color
<test>- Sets an RGB color for the entity.
SetDamageFilter
<test>- Sets a filter for this entity for when it receives damage.
EnableDamageForces
- Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces
- Prevents the entity from being pushed by damage done to it.
Reflection:
DisableDrawInFastReflection
(in all games since P2)- Turns off rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material. EnableDrawInFastReflection
(in all games since P2)- Turn on rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
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 P2)- This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight
(in all games since P2)- This object may receive light or shadows from projected textures.
Outputs
OnIgnite
!FGD- Fired when the entity catches fire, such as from an
env_entity_igniter
or theIgnite
inputs. OnFizzled
(only in)
- Fired when this entity is fizzled by a
trigger_portal_cleanser
or, forprop_weighted_cube
, the Dissolve or SilentDissolve inputs. :Bug:It does not fire when the object is fizzled by other means such as
env_entity_dissolver
. [todo tested in?]