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.
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
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