playerData and startPositions
Posted: 04 Feb 2012, 07:57
playerData
I assume the indexes in this array directly correlate to player id's? So playerData[me] == my player data?
What are the possible values for the .colour property? Is it numbers or strings? If strings, how do I localise them - using the _() function? How is colour defined - team, starting position, something else?
I assume the .position property can be used to cross-reference with startPositions to get x,y of that position?
What are the possible values for .team property? What happens if the game is using dynamic alliances (alliancesType == ALLIANCES) - the object won't get updated? Considering the presence of allianceExistsBetween() function, is there any need for the .team property in the playerData array? Or does this property only apply when alliancesType = ALLIANCES_TEAMS to state the team name (eg. A, B, C, etc)?
startPositions
Is this array indexed by the player id, or by the start position on the map?
Eg. if player 4 is in position 2, to get the start position of player 4 do I:
a) startPositions[playerData[4].position]
or
b) startPositions[4]
Sorry for all the questions. I'm documenting as I go
I assume the indexes in this array directly correlate to player id's? So playerData[me] == my player data?
What are the possible values for the .colour property? Is it numbers or strings? If strings, how do I localise them - using the _() function? How is colour defined - team, starting position, something else?
I assume the .position property can be used to cross-reference with startPositions to get x,y of that position?
What are the possible values for .team property? What happens if the game is using dynamic alliances (alliancesType == ALLIANCES) - the object won't get updated? Considering the presence of allianceExistsBetween() function, is there any need for the .team property in the playerData array? Or does this property only apply when alliancesType = ALLIANCES_TEAMS to state the team name (eg. A, B, C, etc)?
startPositions
Is this array indexed by the player id, or by the start position on the map?
Eg. if player 4 is in position 2, to get the start position of player 4 do I:
a) startPositions[playerData[4].position]
or
b) startPositions[4]
Sorry for all the questions. I'm documenting as I go