Model entity/Generic Keyvalues, Inputs and Outputs/Inputs: Difference between revisions
Jump to navigation
Jump to search
Note:
but call the same function as
(→Inputs) |
(→Inputs) |
||
Line 2: | Line 2: | ||
{{I|skin|param=int|Selects a [[skin]] from the model's index, starting with 0.}} | {{I|skin|param=int|Selects a [[skin]] from the model's index, starting with 0.}} | ||
{{I|SetBodyGroup|param=int|Sets the the active {{ent|$bodygroup}}.}} | {{I|SetBodyGroup|param=int|Sets the the active {{ent|$bodygroup}}.}} | ||
{{I|Color|param=color255|Sets an RGB color for the entity.}} | |||
{{I|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>.}} | |||
{{I|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!}}}} | |||
{{I|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}}}} | |||
{{I|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.}} | |||
=== Animation === | |||
{{I|SetCycle|param=float|Skip to a specific point in the current animation.|only={{tf2}}}} | |||
{{I|SetPlayBackRate|param=float|Change the animation speed multiplier.}} | |||
=== Lighting / Reflectinos / Shadow === | |||
{{I|SetLightingOrigin|param=targetname|Sets the entity's lighting origin to use this entity's position.}} | |||
{{I|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}}}} | |||
{{I Reflection}} | |||
{{I Shadow}} | |||
=== Miscellaneous === | |||
{{I|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}} | |||
{{I|Ignite|Makes the entity catch on fire indefinitely.}} | {{I|Ignite|Makes the entity catch on fire indefinitely.}} | ||
{{I|IgniteLifetime|param=float|Makes the entity catch on fire for a given amount of time.}} | {{I|IgniteLifetime|param=float|Makes the entity catch on fire for a given amount of time.}} | ||
Line 8: | Line 28: | ||
{{note|<code>IgniteNumHitboxFires</code> / <code>IgniteHitboxFireScale</code> are still present in games post {{l4d2}} but call the same function as <code>Ignite</code> (they still take integer and float parameter but don't do anything with them)}} | {{note|<code>IgniteNumHitboxFires</code> / <code>IgniteHitboxFireScale</code> are still present in games post {{l4d2}} but call the same function as <code>Ignite</code> (they still take integer and float parameter but don't do anything with them)}} | ||
{{I|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.}} | {{I|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.}} | ||
{{I| | {{I|EnableDamageForces|Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).}} | ||
{{I| | {{I|DisableDamageForces|Prevents the entity from being pushed by damage done to it.}} | ||
{{I|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]].}} | {{I|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]].}} | ||
{{I|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]].}} | {{I|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]].}} | ||
Revision as of 20:14, 5 October 2024
Inputs
- SetBodyGroup <integer >
- Sets the the active $bodygroup.
- Color <color255 >
- Sets an RGB color for the entity.
- 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 (rendermode) set to a number other than 0.
- SetModelScale <vector > (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:Negative or extremely high values can cause crashes!
- SetModel <string > (only in
)
- Changes the model to the specified path. Form of models/ammo/ammo_us.mdl.
Important:Absolutely NO quotes! Make sure you use the forward slash '/'. Merasmus says to heed this advice, else thou shalt corrupt the VMF.
- AlternativeSorting <boolean >
- 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.
Animation
- SetCycle <float > (only in
)
- Skip to a specific point in the current animation.
- SetPlayBackRate <float >
- Change the animation speed multiplier.
Lighting / Reflectinos / Shadow
- SetLightingOrigin <targetname >
- Sets the entity's lighting origin to use this entity's position.
SetLightingOriginHack <targetname >(removed since)
- Deprecated.
Offsets the entity's lighting origin by their distance from an info_lighting_relative. UseSetLightingOrigin
instead.
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.
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.
Miscellaneous
- SetDamageFilter <targetname >
- Sets a filter for this entity for when it receives damage.
- Ignite
- Makes the entity catch on fire indefinitely.
- IgniteLifetime <float >
- Makes the entity catch on fire for a given amount of time.
- IgniteNumHitboxFires <integer > (removed since
)
- Makes the entity catch on fire with a given number of hitbox fire particles.
- IgniteHitboxFireScale <float > (removed since
)
- Makes the entity catch on fire with a given scale for hitbox fire particles.

IgniteNumHitboxFires
/ IgniteHitboxFireScale
are still present in games post 
Ignite
(they still take integer and float parameter but don't do anything with them)- 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.
- 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.