- Home /
Giving individual players control of specific units in an RTS/MOBA
Hi all
I'm just having some trouble figuring out how my game will be structured. To try and impart what I'm trying to achieve, it's best to liken it to a MOBA: Two teams, each with multiple players. Each player will not only control more than one hero, but a hero and some other units.
Now, here's what I was thinking: There would be a "GameController" script attached to an empty object, and when a player joins, the controller assigns him/her a team (1 or 2) and a player number (incrementing from 1 to 10). After that, any unit would have a variable "player" and "team", each corresponding to it's owner. That way, team 1 units can only attack team 2 units and vice-versa, and only player 1 can control units who belong to player 1, etc.
This all makes sense in my mind, but I need some clarification on how to achieve this. Specifically, how would I tie one specific player to an instance of a player object with his specific player number, team number, and gold?
Thanks in advance.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Messed up character controls on Android Platform 0 Answers
Player vibrates back and forth when moving 2 Answers
Controlling a sphere object 1 Answer
How do I get an NPC to follow the player and then allow the player to swap between characters 0 Answers