• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Fun stuff with teams ; o

Status
Not open for further replies.
So... a lot of people check to see if a player is currently playing by using 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.
 
Level 13
Joined
Mar 24, 2010
Messages
950
thats neat would this be a possible fix to get around not being able to share control with different teams? like lets say theres 4 teams of 3 then u make it 2 teams of 6 within the game (as far as alliances go) well with the new bnet patches this cant be done anymore so maybe it can be forced this way
 
Status
Not open for further replies.
Top