[GUI Library] TeamLib (satm)

SerraAvenger

Cuz I can
Reaction score
234
A simple team library. Will not set teams in the lobby!

API
Both player and team are of type int!

PlayerSetTeam( player, team )
TeamCreate() -> team
TeamSetAlliance( team, relation, allianceSetting )
PlayerGetTeam( player ) -> int
PlayerGetTeamGroup( player ) -> playergroup
TeamGetPlayerGroup( team ) -> playergroup

How to use
First, import the library.
Then, set it's unique id to satm (serra avenger team)

Create a couple of "int" variables for your teams.
For example, if you have a "West Force" and an "East Force", create these two variables of type int.
Then, populate them with the "Team Create" function.

Now you only have to add the players to the teams with the "Player Set Team" action.

If you want to store some stuff for a team, for example the Team Name or the Team AI player or something, just create an array with the size of 30 and use the team as index.
Code:
TeamName[ Player Get Team( Triggering Player ) ]

Restrictions
Only one team per player.
If alliance settings change for a team, all alliance settings towards and from the team will be changed.
A maximum of 30 teams is supported.
This software is released under the NonCommercial Sampling Plus CreativeCommons license.

Changelog
6/18/2010 - Added comment that shows name, version and library id V 0.2
 

Attachments

  • TeamLib.SC2Lib
    34.5 KB · Views: 404

Sevion

The DIY Ninja
Reaction score
413
Yeah. For the life of me, I cannot import it.

Well. I've imported it, but can't figure out the next part. And there're no new actions. Also, the editor freezes if you try to move the import directory :( I had to copy it to the SC2 directory in my documents folder.

Nevermind... I figured it out.

Code looks nice. But.... what's up with the Untitled Function and Untitled Variable?

I also see you use the Custom Script method of coding :)

All-in-all, very good!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top