PostSolvedCustom spawn locations

Posts 1–6 of 6 · Page 1 of 1
Custom spawn locations
Help me, need custom spawn locations. Thanks
The Easiest way is this, you can add more and also put for different maps.

Code:
Spawnpoints()
{
     switch(randomInt(2))
     {
           case 0:
           self setOrigin(blablabla);
           break;
           case 1:
           self setOrigin(blablabla);
           break;
      }
}
Thanks you. Hmm but i want to use it for S&D so i need spawn locations for axis and allies.
Quote Originally Posted by TechnoX View Post
Thanks you. Hmm but i want to use it for S&D so i need spawn locations for axis and allies.
Code:
if ( self.pers["team"] == "allies" ) 
{
              switch(randomInt(2))
              {
              case 0:
              self setOrigin(blablabla);
              break;
              case 1:
              self setOrigin(blablabla);
              break;
              }
}
???
Ye like that, thanks.
Or you can utilise arrays :3
Code:
self.spawnLocation["allies"] = [];
self.spawnLocation["allies"][0] = (123, 456, 789);
self.spawnLocation["allies"][1] = (123, 456, 789);
self.spawnLocation["allies"][2] = (123, 456, 789);
self.spawnLocation["allies"][3] = (123, 456, 789);
self.spawnLocation["axis"] = [];
self.spawnLocation["axis"][0] = (123, 456, 789);
self.spawnLocation["axis"][1] = (123, 456, 789);
self.spawnLocation["axis"][2] = (123, 456, 789);
self.spawnLocation["axis"][3] = (123, 456, 789);

self setOrigin(self.spawnLocation[self.pers["team"]][randomInt(self.spawnLocation[self.pers["team"]].size)]);
All you need to do is add more spawn locations to the array, the setOrigin code will 'update' automatically.

/marked as solved
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?