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

Player speedmod: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(its position in the world irrelevant so it's logical entity)
 
(27 intermediate revisions by 17 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{CD|CMovementSpeedMod|file1=player.cpp}}
{{this is a|logical entity|name=player_speedmod}} This entity speeds up or slows down player velocity over time (slow motion / fast forward.) To disable it, fire the input "ModifySpeed 1.0" to reset the speed multiplier.


{{DISPLAYTITLE:player_speedmod}}
{{Note|Using player_speedmod will always disable the flashlight. To enable the flashlight even as player_speedmod is active: right after firing the ModifySpeed input, fire an "EnableFlashlight" input to !player.}}
==Entity Description==
{{Warning|player_speedmod will not reset if a '''round''' restarts.}}
Speeds up or slows down player velocity over time (slow motion / fast forward.) To disable it, fire the input "ModifySpeed 1.0" to reset the speed multiplier.
__NOTOC__
==Keyvalues==
{{KV Targetname}}


Using player_speedmod will always disable the flashlight. To enable the flashlight even as player_speedmod is active: right after firing the ModifySpeed input, fire an "EnableFlashlight" input to !player.
==Inputs==
 
{{I|ModifySpeed|Modifies player speed by X amount.|param=float}}
==Keyvalues==
* {{KV Targetname}}


== Flags ==
== Flags ==
* 1 : Suppress weapons
{{fl|1|Suppress weapons}}
* 2 : Suppress HUD
{{Note|Due to the way it is coded, <code>Suppress weapons</code> only holsters and hides the ''active'' weapon. Switching to other weapons (and back to the hidden one) remains available (unless also using <code>Suppress HUD</code>. Even then, switching by picking up new weapons or ammo for depleted weapons is still possible). }}
* 4 : Suppress jump
{{fl|2|Suppress HUD}}
* 8 : Suppress duck
{{fl|4|Suppress jump}}
* 16 : Suppress use
{{fl|8|Suppress duck}}
* 32 : Suppress sprint
{{fl|16|Suppress use}}
* 64 : Suppress attack
{{fl|32|Suppress sprint}}
* 128 : Suppress zoom
{{fl|64|Suppress attack}}
 
{{bug|hidetested=1|<code>Suppress attack</code> does not work on {{gmod}}}}
==Inputs==
{{fl|128|Suppress zoom}}
* {{I Targetname}}
* '''ModifySpeed <float>'''
: Modifies player speed by X amount.


==Outputs==
== See also ==
* {{O Targetname}}
* {{ent|player}}


[[Category:Entities]]
[[Category:Entities]]

Latest revision as of 07:29, 29 April 2025

English (en)Translate (Translate)
C++ Class hierarchy
CMovementSpeedMod
CPointEntity
CBaseEntity
C++ player.cpp

player_speedmod is a logical entity available in all Source Source games. This entity speeds up or slows down player velocity over time (slow motion / fast forward.) To disable it, fire the input "ModifySpeed 1.0" to reset the speed multiplier.

Note.pngNote:Using player_speedmod will always disable the flashlight. To enable the flashlight even as player_speedmod is active: right after firing the ModifySpeed input, fire an "EnableFlashlight" input to !player.
Warning.pngWarning:player_speedmod will not reset if a round restarts.

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

Inputs

ModifySpeed <floatRedirectInput/float>
Modifies player speed by X amount.

Flags

Suppress weapons : [1]
Note.pngNote:Due to the way it is coded, Suppress weapons only holsters and hides the active weapon. Switching to other weapons (and back to the hidden one) remains available (unless also using Suppress HUD. Even then, switching by picking up new weapons or ammo for depleted weapons is still possible).
Suppress HUD : [2]
Suppress jump : [4]
Suppress duck : [8]
Suppress use : [16]
Suppress sprint : [32]
Suppress attack : [64]
Icon-Bug.pngBug:Suppress attack does not work on Garry's Mod
Suppress zoom : [128]

See also