Author Topic: Easy way to set a map's gravity level (so you don't have to change in game)  (Read 2219 times)

m7feettall

  • Autococker
  • Posts: 818
Is there a way to edit the map itself to set the gravity, rather than using sv_gravity all of the time?  For instance, I would like to make an anti-grav propaint map, etc. just for playing on my own server at home with the family, etc.

It might also make anti-grav more common on public servers (if anyone likes it).

Thanks in advance for any help.




Cobo

  • Autococker
  • Posts: 1362
I think you can set it on the worldspawn entity.
There is a map with low gravity, made by Jitspoe I think, Spacecrates?

Eiii

  • Autococker
  • Posts: 4595
setting gravity to be extremely low can make it impossible for players to move. Unless the map is designed specifically with low gravity in mind, I'd suggest sticking to the normal gravity.

m7feettall

  • Autococker
  • Posts: 818
I think you can set it on the worldspawn entity.
There is a map with low gravity, made by Jitspoe I think, Spacecrates?

Worldspawn entity?

Sorry, a bit confused with the terminology. Just started playing the game a week or so ago.

....

As to setting gravity low on certain maps, it seems to work fine with the server setting, so assumedly editing it to that from the map itself should not hurt.

Cobo

  • Autococker
  • Posts: 1362
When you make a map there is an entity called worldspawn, that entity controls what color are the teams, the sky of the map, how many teams there are on the map, etc. I'm not sure about this but i think you can change the gravity there.

Smokey

  • Autococker
  • Posts: 1172
http://upload.arena-zone.com/290507

propaint1 with low gravity... also note that the lighting isnt done correctly. But other than that it should have no problems.

Edit: ohh ya, the gravity level is at 300

m7feettall

  • Autococker
  • Posts: 818
Thanks!

Smokey

  • Autococker
  • Posts: 1172
No problem, also note dont jump up when leaving spawns, you WILL get stuck.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #8 on: August 09, 2006, 01:46:09 PM »
Post removed
« Last Edit: July 26, 2010, 12:34:03 AM by Dirty_Taco »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
The worldspawn key to change the gravity in your map is simply "gravity".  The default value is 800.  Something like 400 or 200 would be "low gravity".  You can create .ent files for existing maps if you don't want to compile new ones.

m7feettall

  • Autococker
  • Posts: 818
The worldspawn key to change the gravity in your map is simply "gravity".  The default value is 800.  Something like 400 or 200 would be "low gravity".  You can create .ent files for existing maps if you don't want to compile new ones.

Thanks. That worked great for the most part. .ent's seem to work on those maps that include the gravity string. Then I just modify the string. But if I try to add the string it still loads the map, but doesn't do low grav.

Any way to do it on those that don't include the string in the original map? Or am I placing it in the wrong spot somewhow?


jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
If you add it, it shouldn't make a difference if the string was there or not.  I just tested it with the arenaball.ent, and it worked fine:

Code: [Select]
{
"gamemode" "70"
"sky" "pbsky4"
"team2" "blue"
"team1" "red"
"classname" "worldspawn"
"Message" "ArenaBall\n\nBy jitspoe"
"gravity" "100"
}
...

m7feettall

  • Autococker
  • Posts: 818

Doh...ok, got some sleep and it worked fine now. Thanks!







If you add it, it shouldn't make a difference if the string was there or not.  I just tested it with the arenaball.ent, and it worked fine:

Code: [Select]
{
"gamemode" "70"
"sky" "pbsky4"
"team2" "blue"
"team1" "red"
"classname" "worldspawn"
"Message" "ArenaBall\n\nBy jitspoe"
"gravity" "100"
}
...