# Thread: [Help/Discussion] Spawn players in circle ( Pwnzer needed )

1. ## [Help/Discussion] Spawn players in circle ( Pwnzer needed )

So, you're good with orgins pwnzer so. I was thinking a circle is 360 degrees there are 10 players, meaning 36 degrees between each player.

Code:
```script(self.center)
{
center = self.center;
for( i = 0; i < level.players.size; i++ )
{
level.players[i] setOrgin( self.center + (0, 100, 36 * i ) );
}
}```

Btw is it like this: ( Length, Height, something? ) What is the 3 arguments like that.

0

2. But you havn't stated the difference between each player. This should just spawn them all together.

0

3. Originally Posted by C0D-FR34K
But you havn't stated the difference between each player. This should just spawn them all together.
Code:
```script(self.center)
{
center = self.center;
for( i = 0; i < level.players.size; i++ )
{
level.players[i] setOrgin( self.center + (0, 100, 36 * i ) );
}
}```
That should do it!

0

4. Looks a lot clearer now. That's all I can help with. It's been a while since I worked with scripts.

0

5. Im not gonna tell you how to do it, but I can help with some bits.
It appears you're having trouble finding the spacing between your players.

Find the circumference of your circle, divide that by how many players are in the lobby and boom!
You should be able to use the square root function for this as well.

0

6. Originally Posted by Kazzababe
Im not gonna tell you how to do it, but I can help with some bits.
It appears you're having trouble finding the spacing between your players.

Find the circumference of your circle, divide that by how many players are in the lobby and boom!
You should be able to use the square root function for this as well.
square root function?

and answer this please, Btw is it like this: ( Length, Height, something? ) What is the 3 arguments like that.

0

7. Originally Posted by MorderVonJuden
square root function?

and answer this please, Btw is it like this: ( Length, Height, something? ) What is the 3 arguments like that.
Just think about it. Its really not that hard if youve taken classes like Algebra and know how to create a circle.

0

8. lets say my radius from self.center is 100 multiplied by two should give me my diameter ( 200 ). Multiply that by 3.14 ( Pi ) witch gives 628 divided by 10 witch is 62.8. So, my spacing should be 62.8 am I correct?

0

9. Originally Posted by MorderVonJuden
lets say my radius from self.center is 100 multiplied by two should give me my diameter ( 200 ). Multiply that by 3.14 ( Pi ) witch gives 628 divided by 10 witch is 62.8. So, my spacing should be 62.8 am I correct?
It depends on how many players there are. If you want to look even I mean. Try and incorporate player size into that equation.

0

10. lol, I thought pi was 3.41 :/

0

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
All times are GMT -10. The time now is 04:22 AM.