HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How can you tell how many teams are playing?

02-17-2004, 07:51 AM#1
Moss
I was hoping that using the Integer function "Game - Number of Teams" would specify the actual number of teams playing a game. ie. If 4 people were playing a game and two people were on team 1 and two people were on team 2 then hopefully "Number of Teams" would return 2, and carrying on with that logic, "Number of Players" would return 4. Instead NoTs returns 12 and NoPs returns however many players the map can hold. I don't see the point of that.

How then can I get a trigger to know how many teams are playing? For the Player number I did a trick saying Number of Players that are the enemy of Neutral Hostile.
02-17-2004, 01:47 PM#2
sgtteflon
Number of Teams that are the enemy of neutral hostile? :D
02-17-2004, 07:03 PM#3
Moss
There is no such integer function.

OK I guess it pays to do stuff in the morning as opposed to late at night sometimes. I just realized that the triggers see teams as going from 0 to whatever, like array indexes. So if you are on Team 1 this action:

Player Group - Pick every player in (All players) and do (Game - Display to (Player group((Picked player))) the text: (String((Team number of (Picked player)))))

will tell you you are on Team 0. Did everybody know this already?

So I think I can rig a way to get the real number of teams, but it would be a lot easier if "Number of Teams" actually worked.