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

Target changegravity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Inputs: Substituted IO templates)
(its position in the world irrelevant so it's logical entity)
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{CD|CTargetChangeGravity|file1=controlentities.cpp}}
{{CD|CTargetChangeGravity|file1=controlentities.cpp}}
{{this is a|point entity|name=target_changegravity}}
{{this is a|logical entity|name=target_changegravity}}


It changes the gravity multiplier value to the player who activates this entity. It doesn't work with [[NPC]]s, physics props and other objects.
It changes the gravity multiplier value to the player who activates this entity. It doesn't work with [[NPC]]s, physics props and other objects.


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV|gravity|intn=gravity|integer|Gravity multiplier that player (who activated it) will have when <code>ChangeGrav</code> input fire. Value for this property must be an integer, for example: 1, 2, -1, -2, etc. 0 – gravity will be standard, i.e. equals 1.}}
{{KV|gravity|intn=gravity|integer|Gravity multiplier that player (who activated it) will have when <code>ChangeGrav</code> input fire. Value for this property must be an integer, for example: 1, 2, -1, -2, etc. 0 – gravity will be standard, i.e. equals 1.}}


==Inputs==
== Inputs ==
{{I|ChangeGrav|Apply gravity multiplier value to player.}}
{{I|ChangeGrav|Apply gravity multiplier value to player.}}
{{I|ResetGrav|Return default gravity value to player.}}
{{I|ResetGrav|Return default gravity value to player.}}

Latest revision as of 08:12, 29 April 2025

C++ Class hierarchy
CTargetChangeGravity
CPointEntity
CBaseEntity
C++ controlentities.cpp

target_changegravity is a logical entity available in all Source Source games.

It changes the gravity multiplier value to the player who activates this entity. It doesn't work with NPCs, physics props and other objects.

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

gravity (gravity) <integer>
Gravity multiplier that player (who activated it) will have when ChangeGrav input fire. Value for this property must be an integer, for example: 1, 2, -1, -2, etc. 0 – gravity will be standard, i.e. equals 1.

Inputs

ChangeGrav
Apply gravity multiplier value to player.
ResetGrav
Return default gravity value to player.