Share via

TeamSelect

Garrett Tiller 31 Reputation points
2020-04-21T05:39:27.137+00:00

Im using Unity and Xbox Live to make a sports game with a team selection screen similar to Madden

What I'm trying to do is have the controller/player to choose a side

                if (playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam)
                {
                    if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v >= 0.01)
                    {
                        homeTeam.GetComponent<TeamSelection>().ToggleLeft();
                    }
                    else if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v <= -0.01)
                    {
                        homeTeam.GetComponent<TeamSelection>().ToggleRight();
                    }
                   if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = h >= 0.01)
                    {
                        playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam();
                    }
                }
                if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= roadTeam)
                {
                    if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = v >= 0.01)
                    {
                        roadTeam.GetComponent<TeamSelection>().ToggleLeft();
                    }
                    else if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v <= -0.01)
                    {
                        roadTeam.GetComponent<TeamSelection>().ToggleRight();
                    }
                   if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = h <= -0.01)
                    {
                        playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam();
                    }
                }

I keep getting this error

Error CS0029 Cannot implicitly convert type 'UnityEngine.GameObject' to 'int'

What did I get wrong?

Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-04-21T07:23:08.14+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Microsoft Q&A is under a public preview now. Not all topics are supported now. The supported topics are listed on the right top.

    Questions about Unity and Xbox Live is not supported now. Please ask this question in Xbox Live Development Forum.

    Thank you!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.