Changing gravity

Discussion in 'Tutorials & Resources' started by KaidemonLP, Jul 7, 2017.

  1. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    198
    Positive Ratings:
    33
    I want to change the gravity of the map, but without doing it manualy. I tried making a point_servercommand and executing the command on the map start but nothing changes.
    Is there any way to do it?
     
  2. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,018
    Positive Ratings:
    1,181
    I don't know what you mean by "without doing it manually," but trigger_gravity is the way to go. A point_servercommand won't work unless you or the server operator running your map enables the entity first using sv_allow_point_servercommand.
     
    • Agree Agree x 1
  3. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    184
    Positive Ratings:
    38
    Another route to enable low-gravity with a trigger, is by changing the player's gravity through an AddOutput.
    You can use a trigger in your map that you already have such as a trigger_multiple, trigger_push, trigger_teleport, etc or even a button and put an output on it to give them gravity. The output would look something like this:
    Column 1 Column 2 Column 3 Column 4
    Output Target Input Parameter
    OnSomething !activator AddOutput gravity [? - ?]

    for a button it'd be OnPressed or OnDamaged and for a trigger it'd be OnStartTouch. the value of gravity is a percentage of the base value so .5 is half the gravity and 2 is double it.