User:Pinsplash/BaseAnimating

From Valve Developer Community
Jump to: navigation, search

Functions normally reserved only for animating/moving objects:


@BaseClass = CBaseAnimating
[
        model(studio) : "World Model" :  : "The model this entity should appear as. 128 character limit."
        skin(integer) : "Skin" :  : "Some models have multiple skins. This value selects from the index, starting with 0."
        solid(choices) : "Collisions" :  : "Method of collision for this entity." =
        [
                0: "None"
                1: "BSP (QPhysics)"
                2: "Bounding Box"
                3: "Oriented Bounding Box"
                4: "Oriented Bounding Box, constrained to Yaw only"
                5: "Custom/Test"
                6: "VPhysics"
        ]
        body(integer) : "Body Group" :  : "Sets the the active $bodygroup."
        hitboxset(string) : "Hitbox Set" :  : "Sets the $hboxset to use."
        sequence(integer) : "Sequence" :  : "Default animation sequence for the model to be playing after spawning."
        playbackrate(float) : "Playback Rate" :  : "A multiplier of the framerate at which animations are played, negative values are accepted. Default is 1.0"
        cycle(float) : "Cycle" :  : "The current frame of the currently playing animation, on a range from 0-1."
        LightingOrigin(target_destination) : "Lighting Origin" :  : "Select an entity (not info_lighting!) from which to sample lighting instead of the entity's origin."
        LightingOriginHack(target_destination) : "Lighting Origin Offset" :  : "The info_lighting_relative from which to sample lighting instead of the entity's origin. Not available in L4D series."
        damagefilter(target_destination) : "Damage Filter Name" :  : "When this entity receives damage, it will filter by this entity."
        fademindist(float) : "Start Fade Distance" :  : "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(float) : "End Fade Distance" :  : "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."
        fadescale(float) : "Fade Scale" :  : "If specified in the map properties, 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."
        rendermode(choices) : "Render Mode" : 0 : "Set a non-standard rendering mode on this entity." =
        [
                0: "Normal"
                1: "Color"
                2: "Texture"
                3: "Glow"
                4: "Solid/Alphatest"
                5: "Additive"
                6: "Removed, does nothing"
                7: "Additive Fractional Frame"
                8: "Alpha Add"
                9: "World Space Glow"
                10: "Don't Render"
        ]
        renderamt(integer) : "Render FX / Transparency (0 - 255)" :  : "Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible."
        rendercolor(color255) : "Render Color (R G B)" :  : "Color tint."
        renderfx(choices) : "Render FX" :  : "Preset pattern of appearance effects." =
        [
                0: "None"
                1: "Slow Pulse"
                2: "Fast Pulse"
                3: "Slow Wide Pulse"
                4: "Fast Wide Pulse"
                5: "Slow Fade Away"
                6: "Fast Fade Away"
                7: "Slow Become Solid"
                8: "Fast Become Solid"
                9: "Slow Strobe"
                10: "Fast Strobe"
                11: "Faster Strobe"
                12: "Slow Flicker"
                13: "Fast Flicker"
                14: "Constant Glow"
                15: "Distort"
                16: "Hologram (Distort + fade)"
                17: "Scale Up"
                22: "Spotlight FX"
                23: "Cull By Distance"
                24: "Fade Wider Pulse"
                26: "Fade Near"
        ]
        shadowcastdist(integer) : "Shadow Cast Distance" :  : "Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity."
        disableshadows(choices) : "Disable Shadows" :  : "Prevent the entity from creating rendertarget shadows. Does not affect projected textures." =
        [
                0: "No"
                1: "Yes"
        ]
        disablereceiveshadows(choices) : "Disable Receiving Shadows" :  : "Prevent the entity from receiving rendertarget shadows on itself." =
        [
                0: "No"
                1: "Yes"
        ]
        modelindex(float) : "Model Index" :  : "Changes the entity's model to a precached model on the map. Don't touch if you don't know what you're doing. Using an invalid value will instantly crash the game, this includes 0 and 1."
        modelscale(float) : "Model Scale" :  : "A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however. Not available in Portal, L4D series, SDK 2013."
        glowbackfacemult(float) : "Glow Backface Multiple (Since L4D2)" :  : "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."
        MoveType(choices) : "Move Type (Since AS)" :  : "Sets a movetype for this entity, which changes its movement behavior." =
        [
                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"
        ]
        CollisionGroup(choices) : "Collision Group (Since AS)" :  : "Sets a collision group for this entity, which changes its collision behavior." =
        [
                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"
        ]
        SuppressAnimSounds(choices) : "No Animation Sounds (Since P2)" :  : "Silences sounds linked to animations." =
        [
                0: "No"
                1: "Yes"
        ]
        disableshadowdepth(choices) : "Disable ShadowDepth (Since P2)" :  : "Makes this entity not cast a shadow from env_projectedtextures." =
        [
                0: "No"
                1: "Yes"
        ]
        shadowdepthnocache(choices) : "Projected Texture Cache (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." =
        [
                0: "Default"
                1: "No cache - render every frame"
                2: "Cache it - render only once"
        ]
        disableflashlight(choices) : "Disable Flashlight (Since P2)" :  : "Used to disable all projected texture lighting and shadow casting on this entity." =
        [
                0: "No"
                1: "Yes"
        ]
]
////////////////////////inputs
        input skin(integer) : "Selects a skin from the model's index, starting with 0."
        input SetBodyGroup(integer) : "Sets the the active $bodygroup."
        input Ignite(void) : "Makes the entity catch on fire indefinitely."
        input IgniteLifetime(float) : "Makes the entity catch on fire for a given amount of time."
        input IgniteNumHitboxFires(integer) : "Makes the entity catch on fire with a given number of hitbox fire particles. Does not function correctly in L4D2 onward."
        input IgniteHitboxFireScale(float) : "Makes the entity catch on fire with a given scale for hitbox fire particles. Does not function correctly in L4D2 onward."
        input BecomeRagdoll(void) : "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."
        input SetLightingOrigin(target_destination) : "Sets the entity's lighting origin to an info_lighting."
        input SetLightingOriginHack(target_destination) : "Offsets the entity's lighting origin by their distance from an info_lighting_relative. Not available in L4D series."
        input fademindist(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."
        input fademaxdist(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."
        input SetModelScale(vector) : "Multiplies the size of the model. Does not alter the physics collisions in most cases, however. Negative values are accepted. 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. Not in Portal, L4D series, SDK 2013."
        input Alpha(integer) : "Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode set to a number other than 0."
        input AlternativeSorting(integer) : "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."
        input Color(color255) : "Sets an RGB color for the entity."
        input SetDamageFilter(target_destination) : "Sets a filter for this entity for when it receives damage."
        input EnableDamageForces(void) : "Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done)."
        input DisableDamageForces(void) : "Prevents the entity from being pushed by damage done to it."
        input EnableShadow(void) : "Allows the entity to draw a rendertarget shadow."
        input DisableShadow(void) : "Prevents the entity from drawing a rendertarget shadow."
        input EnableDraw(void) : "Since P2. Removes EF_NODRAW from the entity."
        input DisableDraw(void) : "Since P2. Applies EF_NODRAW to the entity. Note that this is different than Render Mode 10."
        input EnableReceivingFlashlight(void) : "Since P2. Makes it so that the entity is lit by env_projectedtextures."
        input DisableReceivingFlashlight(void) : "Since P2. Prevents the entity from being lit by env_projectedtextures. The shadow made by the texture will still cast."
        input EnableDrawInFastReflection(void) : "Since P2. Makes the entity be rendered in reflections from water materials using $reflectonlymarkedentities."
        input DisableDrawInFastReflection(void) : "Since P2. Prevents the entity from rendering in fast reflections."
////////////////////////outputs
        output OnIgnite(void) : "Fired when the entity catches fire, such as from an env_entity_igniter or the Ignite inputs."
        output OnFizzled(void) : "Since P2. Fired when this entity is fizzled by a fizzler or any other means. (Except the Dissolve input. Use SilentDissolve instead.)"

Don't forget to also add this if you don't have it:

Basic functions for all entities. Recommended to paste at the top of base.fgd.


@BaseClass base(Targetname, Parentname, Angles, Origin, Global) = CBaseEntity
[
        ResponseContext(string) : "Response Contexts" :  : "Pre-defined response system contexts for this entity. Format is key:value,key:value,..."
        effects(integer) : "Effects" :  : "Combination of effect flags to use."
        ltime(float) : "Local Time" :  : "The local time of the entity, independent of the global clock. Used mainly for physics calculations."
        nextthink(float) : "Next Think" :  : "Amount of time before the entity thinks again."
        hammerid(integer) : "Hammer ID" :  : "The entity's Hammer ID. Mainly used by plugins and debugging commands, such as ent_keyvalue. Can be manually assigned. Entities spawned at run-time are not assigned any Hammer ID."
        mincpulevel(integer) : "Minimum CPU Level (Since L4D)" :  : "Minimum CPU Level allowed for this entity. 0 means all levels allowed."
        maxcpulevel(integer) : "Maximum CPU Level (Since L4D)" :  : "Maximum CPU Level allowed for this entity. 0 means all levels allowed."
        mingpulevel(integer) : "Minimum GPU Level (Since L4D)" :  : "Minimum GPU Level allowed for this entity. 0 means all levels allowed."
        maxgpulevel(integer) : "Maximum GPU Level (Since L4D)" :  : "Maximum GPU Level allowed for this entity. 0 means all levels allowed."
        LagCompensate(choices) : "Lag Compensation (Since L4D2)" : 0 : "Set to Yes to lag compensate this entity. Should be used very sparingly!" = 
        [
                0: "No"
                1: "Yes"
        ]
        is_autoaim_target(choices) : "Is Automatic-Aim Target (Since CSGO)" : 0 : "If yes, automatic-aim assistance will target this entity." = 
        [
                0: "No"
                1: "Yes"
        ]
        ///////////////////////inputs
        input Use(void) : "Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input."
        input DispatchEffect(string) : "Dispatches a special effect from the entity's origin. Replaced by particles since Left 4 Dead."
        input DispatchResponse(string) : "Dispatches a response to the entity."
        input AddContext(string) : "Adds to the entity's list of response contexts. Format is <key>:<value>."
        input RemoveContext(string) : "Remove a context from this entity's list. The name should match the key of an existing context."
        input ClearContext(string) : "Removes all contexts from this entity's list."
        input CallScriptFunction(string) : "Since L4D2. Execute a VScript function in the scope of the receiving entity."
        input SetLocalOrigin(string) : "Since p2. Set this entity's origin in the map. (dubious)"
        input SetLocalAngles(string) : "Since p2. Set this entity's angles in the map. (dubious)"
]