Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by UFO_Pirate · Dec 08, 2013 at 03:47 AM · 2dnetworkingmultiplayerwebplayerteams

How do you make teams in a multiplayer game?

I'm currently making an 8-bit retro multiplayer game, but I don't know how to make teams. I've watched this video: Unity:Tutorial on intro to networking to make a multiplayer game, but it doesn't tell you how to have different types of players. I need my game to have two teams: Red, and Blue, I want the player's to be different colors depending on their team. I also need to have different spawn points for each team. So, basically I need help with making teams, and have different colored players, and having different spawn points.(BTW my players are cubes/boxes)

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kiloblargh · Dec 08, 2013 at 04:17 AM 1
Share

Have you successfully finished a single-player game? It sounds like the problems you are having are pretty elementary, (a spawn point is just a Vector3, a $$anonymous$$m color is just a $$anonymous$$aterial...) and if you can't figure that stuff out, then the real program$$anonymous$$g issues you're going to come up against in making a >2 player networked game will be way over your head and you should spend more time on the basics.

avatar image UFO_Pirate · Dec 16, 2013 at 04:57 AM 0
Share

I think I'll follow $$anonymous$$iloblargh's advice and work on more basic things.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by nastasache · Dec 16, 2013 at 10:29 AM

To create teams, you can simple use some variables along the players, specifying the team; there's nothing special but basic logic. For example:

Having a players list:

  • playersNames[1] = A;

  • playersNames[2] = B;

  • playersNames[3] = C;

  • playersNames[4] = D;

And two collections of spawn points:

  • spawnPointsRed[0] = Vector3;

  • spawnPointsRed[1] = Vector3;

  • spawnPointsRed[2] = Vector3;

  • spawnPointsBlue[0] = Vector3;

  • spawnPointsBlue[1] = Vector3;

  • spawnPointsBlue[2] = Vector3;

when player join, choose name, Red or Blue, fill the playersNames, look to indexes and fill other list by player index as:

  • playersTeams[1] = Red;

  • playersTeams[2] = Red;

  • playersTeams[3] = Blue;

  • playersTeams[4] = Blue;

So players A&B = Red team, players C&D = Blue team.

Spawn players A&B in a random value from spawnPointsRed, assign Red material.

Spawn players C&D in a random value from spawnPointsBlue, assign Blue material.

I will integrate a feature like this on next update of FPShootNet project under Asset Store.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image UFO_Pirate · Dec 16, 2013 at 11:09 PM 0
Share

Thanks nastasache your answer explains a lot

avatar image nastasache · Dec 16, 2013 at 11:41 PM 0
Share

Thanks, UFO You can see these working at http://www.addframe.net/index.php?p=fpshootnet (multiplayer); I have used exactly above rules.

avatar image
0

Answer by edthered1009 · Aug 28, 2019 at 06:37 PM

How do I change my playermodels? There is only a few color differences between the two models, so how do I change them without going through the strenuous process of changing all of those references? alt text

Thanks!


playermodels.png (11.1 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

Muliplayer Team System? 1 Answer

How should I go about creating an online multiplayer game that involves players trading game objects with eachother for real money? 2 Answers

Syncing SpriteRenderer Between Clients 0 Answers

How do I setup a specific Multiplayer game where there are rounds and teams? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges