Difference between revisions of "Lua:SetTeamAllies"
From Fortress Forever Wiki
Jump to navigationJump to searchMulchman MM (talk | contribs) |
Mulchman MM (talk | contribs) |
||
| Line 13: | Line 13: | ||
Now, the first parameter in SetTeamAllies is the team that's going to be given an ally. The second command is (for now) a bit field of the team who is going to be the ally. | Now, the first parameter in SetTeamAllies is the team that's going to be given an ally. The second command is (for now) a bit field of the team who is going to be the ally. | ||
| − | So, | + | So, |
| + | ==EXAMPLE== | ||
| + | <pre>SetTeamAllies( BLUE_TEAM, 16 );</pre> | ||
| + | tells BLUE TEAM to have an ally of YELLOW TEAM. | ||
| + | |||
| + | Conversely, | ||
| + | ==EXAMPLE== | ||
| + | <pre>SetTeamAllies( YELLOW_TEAM, 4 );</pre> | ||
| + | tells YELLOW TEAM to have an ally of BLUE TEAM. | ||
[[Category:LUA]] | [[Category:LUA]] | ||
Revision as of 14:50, 28 May 2006
SetTeamAllies is used to ally one team to another.
The function only works within a .lua files startup() section
Example
function startup()
SetTeamAllies( BLUE_TEAM, 16 );
SetTeamAllies( YELLOW_TEAM, 4 );
end
Now, the first parameter in SetTeamAllies is the team that's going to be given an ally. The second command is (for now) a bit field of the team who is going to be the ally.
So,
EXAMPLE
SetTeamAllies( BLUE_TEAM, 16 );
tells BLUE TEAM to have an ally of YELLOW TEAM.
Conversely,
EXAMPLE
SetTeamAllies( YELLOW_TEAM, 4 );
tells YELLOW TEAM to have an ally of BLUE TEAM.