View previous topic :: View next topic |
Author |
Message |
pud
Joined: 17 Jun 2005 Posts: 5
|
Posted: Mon Jun 20, 2005 2:40 am Post subject: team spawnpoints |
|
|
NOTE: I posted this at quakesrc already, but I figured a forum of qc coders could answer my question better. I apologize to anyway who's seen this twice now!
okay, having some trouble with spawning a player at a team specific spawnpoint. I want the player to enter the server and appear at a regular spawnpoint, then select a team from an centerprint/impulse menu, then spawn for real at a team specific spawnpoint. teamfortress i know does this. lots of ctf mods probably do too. here's how i'm doing it and its not working:
in PutClientInServer, I leave the spawn code unchanged, but set the player to MOVETYPE_NONE, SOLID_NOT, and DAMAGE_NO. I have tried lots of movetype/solid combinations, as well as setting model to "" (both ways). Also in PutClientInServer I set a timer, self.menutime to time + 3. In PlayerPreThink, I check the timer and if its been three seconds I do the centerprint, but only if self.loyal is true (loyal as in they are loyal to a side, so if they haven't picked a team its false, putclientinserver sets this false on spawn.)
In ImpulseCommands I have this code: (and everything else is commented out)
Code: |
if (self.loyal == FALSE)
{
if (self.impulse == 1)
{
self.team = 1;
self.loyal = TRUE;
spot = find (world, classname, "info_team1_start");
setorigin(self, spot.origin);
self.angles = spot.angles;
}
if (self.impulse == 2)
{
self.team = 2;
self.loyal = TRUE;
spot = find (world, classname, "info_team2_start");
setorigin(self, spot.origin);
self.angles = spot.angles;
}
} |
when I enter the server, the info_player_start is high from the ground (in my test map) and I hear grunting as if I had fallen to the grounf, but I haven't. I stay at the player_start. Then when I select a team, the menu goes away, and I can shoot. (w_attack is set up to return if self.loyal == false) The shooting doesn't come from me though, it comes from the place where I want to be, the info_team1_start! has anyone had this problem before? |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Mon Jun 20, 2005 5:24 pm Post subject: |
|
|
This is a fairly complex subject.
Basically, I recommend you instead modify selectspawnpoint() to figure out where you're supposed to go, and modify respawn() as well, and just use respawn() to place the player. _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Thu Jun 30, 2005 9:36 pm Post subject: |
|
|
ok for ctf, team spawn points are predetermined in the map, by
info_player_team1 or info_player_team2. These are included in the bsp. I'd suggest the point that u use for spawns prior to team choice be info_player_deathmatch or info_player_start (if its an id map).
If you only need 2 teams just download 3wave 4.2 and convert the id maps yourself, and use the teamspawns there?
edit: and yes this would require changing entity () SelectSpawnPoint |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|