Author Topic: setting player spawn locations through .ent  (Read 1300 times)

m7feettall

  • Autococker
  • Posts: 818
setting player spawn locations through .ent
« on: August 21, 2006, 02:39:07 PM »
You all were quite helpful with the anti-grav issue, so here goes another.

I am changing the game mode default on a lot of the maps to DM.  I would like to change some of the spawn points too through ent files.

If I understand correctly it is this string that deals with spawns:

{
"teamnumber" "2"
"angle" "90"
"origin" "-2999 1348 89"
"classname" "info_player_deathmatch"
}

I was thinking that changing the origin coordinates should re-locate the spawns. Is that correct?

And what is the simplest way to find coordinates?

So far I tried loading the map in quark and then using the texture origin coordinates...not sure that is working though.

Thanks for any help you can give.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: setting player spawn locations through .ent
« Reply #1 on: August 21, 2006, 03:54:25 PM »
The easiest way to do this is to go into the game and type "pos" at the console.  This will give you your current position.  You can then use that for origins on entities.  Another handy command is "condump".  You can dump everything in the console to a text file.  It's a bit easier to work with.

m7feettall

  • Autococker
  • Posts: 818
Re: setting player spawn locations through .ent
« Reply #2 on: August 21, 2006, 09:48:36 PM »
Thanks! That is just what I was hoping existed but couldn't find!

m7feettall

  • Autococker
  • Posts: 818
Re: setting player spawn locations through .ent
« Reply #3 on: August 21, 2006, 10:19:42 PM »
Tried it and it worked great, with the exception of one spawn that caused me to fall off the map into space and then apparently splat.

I guess fractions are important :)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: setting player spawn locations through .ent
« Reply #4 on: August 22, 2006, 02:36:43 AM »
Well, the player origin isn't quite in the center.  I don't know the offset offhand.  It'll work well enough in open spaces, but if there's a low ceiling, you might have to tweak it a bit so players don't fall through the ground or get stuck.

m7feettall

  • Autococker
  • Posts: 818
Re: setting player spawn locations through .ent
« Reply #5 on: August 22, 2006, 10:47:46 AM »
Ah ok, so should you use decimals in the code? Or just use the round numbers?

Also, assuming the third part of the coordinate is the vertical, I could look at the original spawn points for reference.

And thanks for taking the time. You all go the extra mile here :)

« Last Edit: August 22, 2006, 12:21:32 PM by m7feettall »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: setting player spawn locations through .ent
« Reply #6 on: August 22, 2006, 01:36:43 PM »
Use round numbers.