- Joined
- Jul 10, 2007
- Messages
- 6,306
So... a lot of people check to see if a player is currently playing by using
Anyways, just fun information.
GetPlayerTeam returns a team that the player is on. With it, one can infer all of the current forces in the map ; O. When using
ALLIANCE_ALLIED
ALLIANCE_ALLIEDD_ADVUNITS
ALLIANE_ALLIED_UNITS
ALLIANCE_ALLIED_VISION
ALLIANCE_NEUTRAL
ALLIANCE_NEUTRAL_VISION
ALLIANCE_UNALLIED
ALLIANCE_UNALLIED_VISION
by looking in the bj functions to see what these flags refer to, one can infer all of the teams in the map as well as the alliances for those teams : O.
Anyways, just found it interesting ;D.
GetPlayerSlotState(p) == PLAYER_SLOT_STATE_PLAYING
. They also check to see if the controller is a user. An interesting thing with GetPlayerTeam
is that it returns -1 for all slots from 12 to 15 and all slots that don't have a playing player in them. However, the bad thing with this is that it would return a regular team if a player left during initialization.Anyways, just fun information.
GetPlayerTeam returns a team that the player is on. With it, one can infer all of the current forces in the map ; O. When using
GetPlayerSlotState(p) == PLAYER_SLOT_STATE_PLAYING
and leave events, one can manage the original teams on the map ^)^. Also, the alliances can be retrieved for these teams by checking the various player alliances. There are only a few alliance flags (8). They can be found in the function list under constants (bjs)ALLIANCE_ALLIED
ALLIANCE_ALLIEDD_ADVUNITS
ALLIANE_ALLIED_UNITS
ALLIANCE_ALLIED_VISION
ALLIANCE_NEUTRAL
ALLIANCE_NEUTRAL_VISION
ALLIANCE_UNALLIED
ALLIANCE_UNALLIED_VISION
by looking in the bj functions to see what these flags refer to, one can infer all of the teams in the map as well as the alliances for those teams : O.
Anyways, just found it interesting ;D.