Gravity Switches

Avatar
TripleG10
107 Posts
Posted Jun 01, 2011
I've been searching the web for while now, but I can't seem to find a page telling me how to make gravity change by the push of a button. If anybody can help me that would be great, but it's not something urgent in my mapping currently. Thanks in advance!
Advertisement
Registered users don’t see ads! Register now!
Avatar
Aly
18 Posts
Posted Jun 01, 2011
Replied 41 minutes later
Place a trigger_gravity around your map and have a button that has OnPressed > trigger_gravity > Enable
Avatar
p0rtalplayer
1,366 Posts
Posted Jun 01, 2011
Replied 2 hours later
Just an FYI, you can't change the direction of gravity, only the amount of force it has. You can kinda emulate an orientation change with world portals, but it's imperfect.
Avatar
Aquillians United
10 Posts
Posted Jun 07, 2011
Replied 5 days later
It is possible to change the gravity, but it doesn't work well.
Create a Trigger_Gravity, and set the gravity to -1.0, then make it start disabled, and have the button enable it.
It only starts working after you stop touching the ground after triggering it, and instead of walking on the ceiling, you float around it on your head.
Avatar
TripleG10
107 Posts
Posted Jun 14, 2011
Replied 7 days later
ok, then how do I change just the force of the gravity?
Avatar
SpAM_CAN
103 Posts
Posted Jun 18, 2011
Replied 4 days later
Use a vphysics_motion for physics objects, and trigger_gravity for the player. Take a look at my map, SP_CORECIV. Thats how I did it. I also did ceiling walking using a World Portal.

EDIT: In the small gravity flipper area, i added two func_push with a VERY weak force (about 1). This is enough to restart the calculation of physics for the props in that area. Basically.

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 18, 2011
Replied 5 hours later

Aquillians United wrote:
It is possible to change the gravity, but it doesn't work well.
Create a Trigger_Gravity, and set the gravity to -1.0, then make it start disabled, and have the button enable it.
It only starts working after you stop touching the ground after triggering it, and instead of walking on the ceiling, you float around it on your head.

Any gravity that is below 0 will make the player fly up instead of creating low gravity and make you fall slowly down again. I think the default number for gravity is 600. So a value of 200 will make you jump around like your on the moon.
And yes you will only float around if you jump. To fix this issue I guess you could use a small trigger_push in order to make the player start floating.