Env gravity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{This is a|point|name=env_gravity|game=Black Mesa}} This entity manage gravity, friction and fall damage scale. Affects globally for all clients/players and doesn't affects for other objects (physics objects, [[NPC|NPCs]], e. t. c.). Used in [[xen]] levels from the original campaign to disable fall damage and set player's gravity to the slightly lower gravity value than in earthbound levels.
{{This is a|point entity|name=env_gravity|game=Black Mesa}} This entity manage gravity, friction and fall damage scale. Affects globally for all clients/players and doesn't affects for other objects (physics objects, [[NPC|NPCs]], e. t. c.). Used in [[xen]] levels from the original campaign to disable fall damage and set player's gravity to the slightly lower gravity value than in earthbound levels.
{{back |Black Mesa Level Creation}}
{{back |Black Mesa Level Creation}}



Revision as of 21:28, 17 May 2024

env_gravity is a point entity available in Black Mesa Black Mesa. This entity manage gravity, friction and fall damage scale. Affects globally for all clients/players and doesn't affects for other objects (physics objects, NPCs, e. t. c.). Used in xen levels from the original campaign to disable fall damage and set player's gravity to the slightly lower gravity value than in earthbound levels.

Black Mesa Level Creation

Keyvalues

Inputs

SetGravity <integerRedirectInput/integer>
Set sv_gravity to specific amount. Value in xen levels is 420. Value in earthbound levels is 600 (the default value).
Icon-Bug.pngBug:Value 248 and lower breaks player's jump. It feels like player's jump is too low.
Example.


  [todo tested in ?]
SetFriction <integerRedirectInput/integer>
Set sv_friction to specific amount. With 0 player will slide endlessly. High values will hinder players movement, making them slower. The default value is 4.
Note.pngNote:Even with 0, player's sliding speed has a limit, but only if player is standing. With crouch you can achieve high speed.
Note.pngNote:With 0 value, physics objects in sleep state push player away. Moving physics objects kill player with a high chance.
Example.


SetFallDamageScale <floatRedirectInput/float>
Set sv_falldamagescale to specific amount. Value in xen levels is 0, so, player even don't need longjump module to escape fall damage in xen. Value in earthbound levels is 1 (the default value). With 355.2 value, player will die in any case if take fall damage.


Outputs

See also