HI there,
I am having trouble implementing a certain aspect of my game.
I want to select a team of players from the teamSelectLevel. These players have certain vars set in each, through PlayerPrefs which I will call on the game play scene. My issue is that I am setting my vars like this…
PlayerPrefs.SetInt("player" + count.ToString() + "index", count);
My thought is, that as the count rolls thru, I can assign that object as player1index = 1, player2index = 2… My issue is retrieving that info. When I load my game play level, I have objects which are already assigned indexes, I just want to retrieve the info from the indexes set and apply it, to the objects, waiting for the relevant data.
So, on gamePlay level, player1, must ask for player1index.
My issue is that I can not get that numeral value.
index = PlayerPrefs.GetInt("player" + someValue.ToString + "index");
…always turns up, index = 0.
???Am I doing this right? I think I am, but it is not setting for some reason.