Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default [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 ) );
    	}
    }
    Would that spawn a circle of players? If not please help.

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

    0 Not allowed! Not allowed!
    Last edited by MorderVonJuden; 09-26-2012 at 07:21 PM.

  2. #2
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

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

    0 Not allowed! Not allowed!

  3. #3
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by C0D-FR34K View Post
    But you havn't stated the difference between each player. This should just spawn them all together.
    Your right hold on fixing.
    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 Not allowed! Not allowed!

  4. #4
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

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

    0 Not allowed! Not allowed!

  5. #5
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    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 Not allowed! Not allowed!

  6. #6
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by Kazzababe View Post
    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 Not allowed! Not allowed!
    Last edited by MorderVonJuden; 09-26-2012 at 08:00 PM.

  7. #7
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Quote Originally Posted by MorderVonJuden View Post
    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 Not allowed! Not allowed!

  8. #8
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    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 Not allowed! Not allowed!

  9. #9
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Quote Originally Posted by MorderVonJuden View Post
    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 Not allowed! Not allowed!

  10. #10
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    lol, I thought pi was 3.41 :/

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

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.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.