Logic timescale: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Ent not in fgd}}
{{Ent not in fgd}}
{{this is a|logical entity|name=logic_timescale|game=Portal 2}} It controls the rate at which time passes in the game. Functionally identical to the <code>host_timescale</code> console command, but works without cheats enabled and supports blending between the time scales.
{{this is a|point entity|name=logic_timescale}}  


==Entity description==
Useful to create temporary slow motion or fast-forward effects, as seen in the playable trailer for the movie ''Super 8'' in Portal 2.
It controls the rate at which time passes in the game. Functionally identical to the <code>host_timescale</code> console command, but works without cheats enabled and supports blending between the time scales.
__NOTOC__
== Keyvalues ==
{{KV Targetname}}
{{KV|Blend Time|intn=BlendTime|float|Time in seconds to blend between time scales.}}


Useful to create temporary slow motion or fast-forward effects, as seen in the playable trailer for the movie ''Super 8'' in Portal 2.
== Inputs ==
{{I|SetTimescaleBlendTime|Set time in seconds to blend between time scales.|param=float}}
{{I|SetDesiredTimescale|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.|param=float}}


== FGD Code ==
== FGD Code ==
Line 18: Line 22:
]
]
</source>
</source>
== Keyvalues ==
{{KV|Blend Time|float|Time in seconds to blend between time scales.}}
{{KV Targetname}}
== Inputs ==
{{IO|SetTimescaleBlendTime|Set time in seconds to blend between time scales.|param=float}}
{{IO|SetDesiredTimescale|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.|param=float}}
{{I Targetname}}
== Outputs ==
{{O Targetname}}


== See also ==
== See also ==
* {{l4d2}} [[func_timescale]]
* {{l4d2}} {{ent|func_timescale}}
* {{as}} [[env_slomo]]
* {{as}} {{ent|env_slomo}}

Latest revision as of 08:26, 29 April 2025

Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.

logic_timescale is a logical entity available in Portal 2 Portal 2. It controls the rate at which time passes in the game. Functionally identical to the host_timescale console command, but works without cheats enabled and supports blending between the time scales.

Useful to create temporary slow motion or fast-forward effects, as seen in the playable trailer for the movie Super 8 in Portal 2.

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

Blend Time (BlendTime) <float>
Time in seconds to blend between time scales.

Inputs

SetTimescaleBlendTime <floatRedirectInput/float>
Set time in seconds to blend between time scales.
SetDesiredTimescale <floatRedirectInput/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.

FGD Code

@PointClass base(Targetname) = logic_timescale : "An entity that controls the rate at which time passes."
[
	BlendTime(float) : "Blend Time" : "1.0" : "Time in seconds to blend between time scales."
	
	input SetTimescaleBlendTime(float) : "Set time in seconds to blend between time scales."
	input SetDesiredTimescale(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."
]

See also