This article relates to the game "Left 4 Dead 2". Click here for more information.

Func timescale: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Initial creation of article on func_timescale)
 
No edit summary
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{l4d2 point|func_timescale}} It is used to adjust the time scale of the server and client.
{{LanguageBar}}
{{stub}}
{{L4d2 topicon}}
==KeyValues==
{{CD|CFuncTimescale}}
*{{KV Targetname}}
{{this is a|logical entity|name=func_timescale|game=Left 4 Dead 2}} Adjust the time scale of the server and client.
*{{KV Angles}}
 
*{{ScrollBox|title=desiredTimescale|
== Keyvalues ==
; Desired timescale <[[float]]>
{{KV Targetname}}
: Time scale to blend towards, this is a multiplicative value where 1.0 is normal time, 0.5 is half speed, 2.0 is double speed.
{{KV|Desired timescale|intn=desiredTimescale|float|Time scale to blend towards, this is a multiplicative value where 1.0 is normal time, 0.5 is half speed, 2.0 is double speed.}}
}}
{{KV|Acceleration per second|intn=acceleration|float|How quickly the change per second goes up to the max.}}
*{{ScrollBox|title=acceleration|
{{KV|Minimum blend per second|intn=minBlendRate|float|Minimum change per second when blending from the current timescale to the desired.}}
; Acceleration per second <[[float]]>
{{KV|Perframe delta multiplier|intn=blendDeltaMultiplier|float|The per frame delta between desired and current is multiplied by this to get the maximum change per second.}}
: How quickly the change per second goes up to the max.
 
}}
== Inputs ==
*{{ScrollBox|title=minBlendRate|
{{I|Start|Start blending to the desired timescale.}}
; Minimum blend per second <[[float]]>
{{I|Stop|Stop and blend back to the default timescale (1.0f).}}
: Minimum change per second when blending from the current timescale to the desired.
{{I|Reset|Reset immediately to normal timescale (1.0f).}}
}}
 
*{{ScrollBox|title=blendDeltaMultiplier|
; Perframe delta multiplier <[[float]]>
: The per frame delta between desired and current is multiplied by this to get the maximum change per second.
}}
==Inputs==
{{I Targetname}}
{{ScrollBox|title=AmbientMusic|
; <code>Playsound</code>
: Starts the sound.
; <code>Stopsound</code>
: Stops the sound if it is playing.
}}
==Outputs==
{{O Targetname}}
==See also==
==See also==
==External links==
* {{portal2}} [[logic_timescale]]
[[category:Left 4 Dead 2]]
* {{as}} [[env_slomo]]

Latest revision as of 22:48, 7 June 2025

English (en)中文 (zh)Translate (Translate)

C++ Class hierarchy
CFuncTimescale
CBaseEntity

func_timescale is a logical entity available in Left 4 Dead 2 Left 4 Dead 2. Adjust the time scale of the server and client.

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

Desired timescale (desiredTimescale) <float>
Time scale to blend towards, this is a multiplicative value where 1.0 is normal time, 0.5 is half speed, 2.0 is double speed.
Acceleration per second (acceleration) <float>
How quickly the change per second goes up to the max.
Minimum blend per second (minBlendRate) <float>
Minimum change per second when blending from the current timescale to the desired.
Perframe delta multiplier (blendDeltaMultiplier) <float>
The per frame delta between desired and current is multiplied by this to get the maximum change per second.

Inputs

Start
Start blending to the desired timescale.
Stop
Stop and blend back to the default timescale (1.0f).
Reset
Reset immediately to normal timescale (1.0f).

See also