This article's documentation is for anything that uses the Source engine. Click here for more information.

Math colorblend: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Test)
(→‎Outputs: activator/caller)
 
(28 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{LanguageBar}} {{Source topicon}}
__NOTOC__
__NOTOC__
{{Source topicon}}
{{CD|CMathColorBlend|file1=logicentities.cpp}}
{{Entity|math_colorblend|type=e0}} It is used to create a blend between two colors for controlling the color of another entity.
{{This is a|logical entity|name=math_colorblend}} It is used to create a blend between two colors for controlling the color of another entity.
 
{{ModernNote|The following entities can accept [[color255]] inputs: [[env_sun]], [[env_lightglow]], [[env_beam]], [[env_fog_controller]], [[env_sprite]], [[light_dynamic]], [[shadow_control]], as well as any entity which uses rendercolor.}}


== Keyvalues ==
== Keyvalues ==
{| class="standard-table" width="100%"
{{KV Targetname}}
! Key
{{KV|Minimum Valid Input Value|intn=inmin|integer|Input values below this value will be ignored.}}
! Variable
{{KV|Maximum Valid Input Value|intn=inmax|integer|Input values above this value will be ignored.}}
! Property Name
{{KV|Output RGB color when input is min|intn=colormin|color255|When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.}}
! Default Value
{{KV|Output RGB color when input is max|intn=colormax|color255|When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.}}
! Description
|-
| align="center" width="8%" | targetname
| align="center" width="8%" | <[[string]]>
| [[Targetname|Name]]
|
| The [[Targetname|targetname]] that other entities refer to this entity by.
|-
| align="center" | inmin
| align="center" | <[[string]]>
| Minimum Valid Input Value
| 0
| Input values below this value will be ignored.
|-
| align="center" | inmax
| align="center" | <[[string]]>
| Maximum Valid Input Value
| 1
| Input values above this value will be ignored.
|-
| align="center" | colormin
| align="center" | <[[color255]]>
| Output RGB color when input is min.
| bgcolor="black" | 0 0 0
| When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.
|-
| align="center" | colormin
| align="center" | <[[color255]]>
| Output RGB color when input is max.
| bgcolor="white" | <span style="color:#000">255 255 255</span>
| When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.
|}


== Outputs ==
== Flags ==
{| class="standard-table" width="100%"
{{fl|1|Ignore out of range input values}}
! Output
! Variable
! Description
|-
| align="center" width="8%" | OutColor
| align="center" width="8%" | <[[color255]]>
| Fired when the InValue input is received, with the remapped RGB color as the parameter.
|}


== Inputs ==
== Inputs ==
{| class="standard-table" width="100%"
{{I|InValue|param=float|Input value and fire the output with the remapped value.}}
! Output
! Variable
! Description
|-
| align="center" width="8%" | InValue
| align="center" width="8%" | <[[float]]>
| Input value and fire the output with the remapped value.
|}


== Flags ==
== Outputs ==
* 1 : Ignore out of range input values
{{O|OutColor|param=color255|activator=activator of the InValue input|Fired when the InValue input is received, with the remapped RGB color as the parameter}}
:{{seealso|[[Special:WhatLinksHere/RedirectInput/color32|Entities that can accept color input]]. Also every entity has <code>color</code> input available.}}

Latest revision as of 15:53, 7 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CMathColorBlend
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ logicentities.cpp

math_colorblend is a logical entity available in all Source Source games. It is used to create a blend between two colors for controlling the color of another entity.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Minimum Valid Input Value (inmin) <integer>
Input values below this value will be ignored.
Maximum Valid Input Value (inmax) <integer>
Input values above this value will be ignored.
Output RGB color when input is min (colormin) <color255>
When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.
Output RGB color when input is max (colormax) <color255>
When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.

Flags

Ignore out of range input values : [1]

Inputs

InValue <floatRedirectInput/float>
Input value and fire the output with the remapped value.

Outputs

OutColor <color255RedirectOutput/color32>
!activator = activator of the InValue input
!caller = this entity
Fired when the InValue input is received, with the remapped RGB color as the parameter
See also:  Entities that can accept color input. Also every entity has color input available.