UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Put the Players into Teams

broken avatar :(
Created 11 years ago
by jbird
0 Members and 1 Guest are viewing this topic.
1,665 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
×
jbird's Groups
I want to be able to put the players onto two "teams", basically the only things the teams will do for now is make it so you can't revive people on the other team and powerups don't effect the other team. How could I do this?
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Just give them a team:

Code Snippet
Plaintext
players[0].team = "red";

or

Code Snippet
Plaintext
players[0].team = "blu";

and do all the appropriate if checks in each script.
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
jbird's Groups
Code Snippet
Plaintext
teams()
{
players = getplayers();
for(i=0;i<players.size;i++)
{
if( players.size == 2 )
{
players[0].team = "red";
players[1].team = "blu";
}
else if( players.size == 3 )
{
players[0].team = "red";
players[1].team = "red";
players[2].team = "blu";
}
else if( players.size == 4 )
{
players[0].team = "red";
players[1].team = "red";
players[2].team = "blu";
players[3].team = "blu";
}
}
}
Should that work for the teams?
I don't know how I would disable revives for enemy team though or disable powerup effecting the other team
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Code Snippet
Plaintext
set_teams()
{
players = get_players();
players = array_randomize(players); //randomize players
for(i = 0; i < players.size; i++)
{
if(i % 2 == 0) //even
players[i].da_team = "red";
else //odd
players[i].da_team = "blue";
}
}
Last Edit: June 10, 2015, 01:58:25 am by DidUknowiPwn

 
Loading ...