User:Nescius/sandbox/test9: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{tabs|CBaseAnimating|goldsrc=1|source=1|main=source}} {{CD|CBaseAnimating|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/baseanimating...")
 
(Blanked the page)
Tag: Blanking
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{tabs|CBaseAnimating|goldsrc=1|source=1|main=source}}
{{CD|CBaseAnimating|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/baseanimating.cpp baseanimating.cpp]}}
{{seealso|[[:Category:CBaseAnimating]]}}


'''<code>CBaseAnimating</code>''' is the C++ class from which all entities with [[model]]s inherit, even if they don't actually move.
This category also covers '''<code>CBaseAnimatingOverlay</code>''', which provides animation blending.
{{important|Following Keyvalues / Inputs / Outputs are available for all entities that inherit this class, but may be overwritten by game code.}}
== Keyvalues ==
{{User:Nescius/sandbox/test8|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{User:Nescius/sandbox/test8|[[Skin]]|intn=skin or ModelSkin {{as}}|int|Some models have multiple skins. This value selects from the index, starting with 0.}}
{{User:Nescius/sandbox/test8|Collisions|intn=solid|choices|Method of collision for this entity.<!--
-->{{Expand|title=Choices|margin_left=2em|
:*'''0''': None
:*'''1''': BSP ([[QPhysics]])
{{Bug|In {{portal2|4}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!}}
:*'''2''': [[Bounding box|Bounding Box]]
:*'''3''': Oriented Bounding Box (Use for runtime spawned rotated brush entities)
:*'''4''': Oriented Bounding Box, constrained to [[QAngle|Yaw]] only
:*'''5''': Custom/Test (Usually no collision with anything)
:*'''6''': [[VPhysics]]}}
}}
{{User:Nescius/sandbox/test8|[[Hitbox]] Set|intn=hitboxset|string|Sets the {{Ent|$hboxset}} to use.|nofgd=1}}
{{User:Nescius/sandbox/test8|Body Group|intn=body or SetBodyGroup|int|Sets the the active {{Ent|$bodygroup}}.|nofgd=1}}
<!-- We should make a new page for "model index"? -->
{{User:Nescius/sandbox/test8|Model Index|intn=modelindex|short|Given the number index from dumping the <code>cl_precacheinfo modelprecache</code> 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.}}|nofgd=1}}
{{User:Nescius/sandbox/test8|Model Scale|intn=modelscale|float|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 {{hammer4|2}}, but will appear in-game (tested in {{dods}}). This is fixed in {{hammer++|2}}.}}|since=EP2}}
<!--
  ++ Animating ++
-->
{{style|color:white;font-size:14px;padding-bottom:5px|'''Animating'''}}
{{User:Nescius/sandbox/test8|Sequence|intn=sequence|int|Default animation sequence for the model to be playing after spawning.|nofgd=1}}
{{User:Nescius/sandbox/test8|Playback Rate|intn=playbackrate|float|A multiplier of the [[framerate]] at which animations are played, negative values are accepted. Default is 1.0.|nofgd=1}}
{{User:Nescius/sandbox/test8|Cycle|intn=cycle|float|The current frame of the current animation, on a range from 0-1.|nofgd=1}}
{{User:Nescius/sandbox/test8|Texture Frame|intn=texframeindex|int|The initial frame number for all animated textures on this entity.|nofgd=1}}
<!--
  ++ Effects - Render ++
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Effects - Render'''}}
{{User:Nescius/sandbox/test8|Start Fade Distance|intn=fademindist|float|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]].}}
{{User:Nescius/sandbox/test8|End Fade Distance|intn=fademaxdist|float|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.}}
{{User:Nescius/sandbox/test8|Fade Scale|intn=fadescale|float|If specified in the {{Ent|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 {{Ent|$noforcedfade}}.}}
{{User:Nescius/sandbox/test8|FX Amount/Transparency (0–255)|intn=renderamt|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.}}
{{User:Nescius/sandbox/test8|Render Color (R G B)|intn=rendercolor|color255|Color tint.}}
{{KV Render FX}}
{{KV Rendermode}}
<!--
  ++ Effects - Environment ++
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Effects - Environment'''}}
{{User:Nescius/sandbox/test8|Disable Shadows|intn=disableshadows|boolean|Prevent the entity from creating cheap render-to-texture shadows. Does not affect [[shadow mapping]].}}
{{User:Nescius/sandbox/test8|Disable Receiving Shadows|intn=disablereceiveshadows|boolean|Prevent the entity from receiving shadows on itself.}}
{{User:Nescius/sandbox/test8|Shadow Cast Distance|intn=shadowcastdist|int|Sets how far the entity casts dynamic shadows. 0 means default distance from the {{Ent|shadow_control}} entity.}}
{{User:Nescius/sandbox/test8|Lighting Origin|intn=LightingOrigin|targetname|Select an entity (not {{Ent|info_lighting}}!) from which to sample lighting instead of the entity's [[origin]].}}
{{User:Nescius/sandbox/test8|Lighting Origin Offset|intn=LightingOriginHack|targetname|The {{Ent|info_lighting_relative}} from which to sample lighting instead of the entity's origin. Use <tt>Lighting Origin</tt> instead.|not={{l4ds}}|nofgd=1|deprecated=1}}
{{User:Nescius/sandbox/test8|Disable Flashlight|intn=disableflashlight|boolean|Used to disable [[env_projectedtexture|projected texture]] lighting and shadows on this entity. Identical to <tt>[[Effect flags|EF_NOFLASHLIGHT]]</tt>.|since=P2}}
{{User:Nescius/sandbox/test8|Disable ShadowDepth|intn=disableshadowdepth|boolean|Makes this entity not cast a shadow from {{Ent|env_projectedtexture}} entities. Identical to <tt>[[Effect flags|EF_NOSHADOWDEPTH]]</tt>.|since=P2}}
{{User:Nescius/sandbox/test8|Projected Texture Cache|intn=shadowdepthnocache|choices|Used to hint [[env_projectedtexture|projected texture system]] whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead. Identical to<code>[[Effect flags|EF_SHADOWDEPTH_NOCACHE]]</code>.
:*0: Default
:*1: No cache—render every frame
:*2: Cache it—render only once|since=P2}}
<!--
  ++ Misc ++
Game-Specific Configs
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Miscellaneous'''}}
{{User:Nescius/sandbox/test8|Glow Backface Multiple|intn=glowbackfacemult|float|nofgd=1|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.|only={{l4d2}}}}
{{User:Nescius/sandbox/test8|Move Type|intn=MoveType|choices|Sets a movetype for this entity, which changes its movement behavior.<!-- BREAK -->
{{Expand|title=Move Types|margin_left=2em|
:*'''0''': None, don't move
:*'''1''': Isometric
:*'''2''': Walk, player only, moving on ground
:*'''3''': NPC, movement
:*'''4''': Fly, no gravity
:*'''5''': Fly, with gravity
:*'''6''': Physics
:*'''7''': Push
:*'''8''': [[Noclip]]
:*'''9''': Ladder, for players on ladders
:*'''10''': Spectator
:*'''11''': Custom}}
|since={{as}}|nofgd=1}}
{{User:Nescius/sandbox/test8|Collision Group|intn=CollisionGroup|choices|Sets a collision group for this entity, which changes its collision behavior.<!-- BREAK -->
{{Expand|title=Groups|margin_left=2em|
:*'''0''': None
:*'''1''': Debris, collides only with the world and static props
:*'''2''': Debris, with trigger interaction
:*'''3''': Interactive Debris, doesn't collide with other debris
:*'''4''': Interactive, collides with everything except debris
:*'''5''': Player
:*'''6''': Breakable Glass
:*'''7''': Vehicle
:*'''8''': Player Movement
:*'''9''': In-Vehicle
:*'''10''': Weapon
:*'''11''': Vehicle Clip
:*'''12''': Projectile
:*'''13''': Door blocker, not permitted to go near doors
:*'''14''': Passable Door
:*'''15''': Dissolving
:*'''16''': Pushaway
:*'''17''': NPC Actor, NPCs ignore the player
:*'''18''': NPC Scripted, NPCs do not collide with each other}}
|since={{as}}|nofgd=1}}
{{User:Nescius/sandbox/test8|No Animation Sounds|intn=SuppressAnimSounds|boolean|Silences sounds linked to animations.|since=P2|nofgd=1}}
{{KV DXLevelChoice}}
{{KV SystemLevelChoice}}
== Inputs ==
{{User:Nescius/sandbox/test7|skin|param=int|Selects a [[skin]] from the model's index, starting with 0.}}
{{User:Nescius/sandbox/test7|SetBodyGroup|param=int|Sets the the active {{ent|$bodygroup}}.}}
{{User:Nescius/sandbox/test7|Ignite|Makes the entity catch on fire indefinitely.}}
{{User:Nescius/sandbox/test7|IgniteLifetime|param=float|Makes the entity catch on fire for a given amount of time.}}
{{User:Nescius/sandbox/test7|IgniteNumHitboxFires|param=int|Makes the entity catch on fire with a given number of [[hitbox]] fire particles. Does not function correctly in {{l4d2}} onward.|removed={{l4d2}}}}
{{User:Nescius/sandbox/test7|IgniteHitboxFireScale|param=float|Makes the entity catch on fire with a given scale for [[hitbox]] fire particles. Does not function correctly in {{l4d2}} onward.|removed={{l4d2}}}}
{{User:Nescius/sandbox/test7|BecomeRagdoll|Kills the entity and creates a client-side ragdoll from the model. Input is only passed if the model contains {{ent|$collisionjoints}}. For other models, {{ent|phys_convert}} can be used instead.}}
{{User:Nescius/sandbox/test7|SetLightingOrigin|param=targetname|Sets the entity's lighting origin to use this entity's position.}}
{{User:Nescius/sandbox/test7|SetLightingOriginHack|param=targetname|Offsets the entity's lighting origin by their distance from an {{ent|info_lighting_relative}}. Use <code>SetLightingOrigin</code> instead.|deprecated=1|removed={{l4d}}}}
{{User:Nescius/sandbox/test7|fademindist|param=float|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]].}}
{{User:Nescius/sandbox/test7|fademaxdist|param=float|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]].}}
{{User:Nescius/sandbox/test7|SetModelScale|param=vector|only={{src13}}|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 <code>modelscale</code> keyvalue can be [[AddOutput]]ed as a workaround for other games with this input missing.}}
{{warning|Negative or extremely high values can cause crashes!}}}}
{{User:Nescius/sandbox/test7|SetCycle|param=float|Skip to a specific point in the current animation.|only={{tf2}}}}
{{User:Nescius/sandbox/test7|SetModel|param=string|Changes the model to the specified path. Form of <tt>models/ammo/ammo_us.mdl</tt>.
{{important|Absolutely NO quotes! Make sure you use the forward slash '/'. [[Merasmus]] says to heed this advice, else thou shalt corrupt the VMF.}}|only={{tf2}}}}
{{User:Nescius/sandbox/test7|SetPlayBackRate|param=float|Change the animation speed multiplier.}}
{{User:Nescius/sandbox/test7|Alpha|param=int|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 <tt>0</tt>.}}
{{User:Nescius/sandbox/test7|AlternativeSorting|param=bool|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.}}
{{User:Nescius/sandbox/test7|Color|param=color255|Sets an RGB color for the entity.}}
{{User:Nescius/sandbox/test7|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}}
{{User:Nescius/sandbox/test7|EnableDamageForces|Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).}}
{{User:Nescius/sandbox/test7|DisableDamageForces|Prevents the entity from being pushed by damage done to it.}}
{{I Reflection}}
{{I Shadow}}
== Outputs ==
{{User:Nescius/sandbox/test7|OnIgnite|nofgd=1|Fired when the entity catches fire, such as from an {{ent|env_entity_igniter}} or the <code>Ignite</code> inputs.}}
{{User:Nescius/sandbox/test7|OnFizzled|only={{portal2}}|Fired when this entity is fizzled by a {{ent|trigger_portal_cleanser}} or, for {{ent|prop_weighted_cube}}, the Dissolve or SilentDissolve inputs. :{{bug|It does not fire when the object is fizzled by other means such as {{ent|env_entity_dissolver}}.}}
}}
[[Category:Classes|B]]

Latest revision as of 14:32, 1 October 2024