XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

How to assign each player to a certain index?

Last post 2/9/2010 10:15 PM by crazzzy stoner. 2 replies.
  • 2/9/2010 5:19 AM

    How to assign each player to a certain index?

    Hi, right now when some one joins my game it goes like something like this...    Player player = new  Player();       Game.Tag = player;

    Anyway my problem is i have 2 class's that i would like players to goto. So i was wondering how would you set the online players index so networkgame[1] = player ? All i want to do is make it so 1st gamer to join goes to the first class, 2nd player goes to the 2nd class, 3rd player goes to the 1st class. I'm guess it's easiest by doing it this way? Any help would be great...

    Thankz
    Best Community Game
    The Exterminator
    Stoner Studio Website:
    CrazzzyStoner.webs.com
  • 2/9/2010 5:22 AM In reply to

    Re: How to assign each player to a certain index?

    You might want to look at the network samples in the Education Catalog.

    crazzzy stoner:
    Anyway my problem is i have 2 class's that i would like players to goto.

    What do you mean by 2 class's?
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 2/9/2010 10:15 PM In reply to

    Re: How to assign each player to a certain index?

    I took a gander at the samples already. I mean i have a team 1 class which is basically like the tank class in the peer to peer sample. Then i have another class like the tank class in the sample called team 2 and this class has a few differences from the team 1 class. The problem is how would i make equal teams if the game supports 2 to 8 players? It seams I'm only able to make joining players go to team 1 class. how can i make it so every other player goes to team 1 or team 2 class? so teams will be equal?
    Best Community Game
    The Exterminator
    Stoner Studio Website:
    CrazzzyStoner.webs.com
Page 1 of 1 (3 items) Previous Next