i was actually wondering how would you make a pk tournament with a team of 2 vs another team of 2... i just need to learn how to add the check to see if they have the team of 2 does anyone know how to put it?
//make a for each here with C as char
if (C.MyTeam == GC.MyChar.MyTeam)//Checking for if the other is in your team
{
//What happens if they are in team
}
else
{
//What happens if they are not in team
}
//Team count check
if (C.MyTeam.Value == 2)//Don't know the exactly count for teams
{
//Can join in tournament
}
else//If count is on 1,3,4,5
{
//Can't join in tournament
}
So I don't use lotf much but here's my 2 cents...Quote:
yea i figuered that but lol i dont want team pk as in red blue white and black i just wanted what grill mad is saying.. needed to make a check to see if you have another player in ur team before u enter the npc same as the other team so its 2 people ina team vs another team of 2
public int Team1Joined = 0; public int Team2Joined = 0;
GC.MyChar.Team1Joined += 1;
GC.MyChar.Team2Joined += 1;
if (GC.MyChar.Team1Joined >= 2;
is a waste, when it is done by one line.Quote:
Then when you have the NPC tele them to the map, you can use:Code:public int Team1Joined = 0; public int Team2Joined = 0;
andCode:GC.MyChar.Team1Joined += 1;
Then if someone is asking to join, you can use a if statement:Code:GC.MyChar.Team2Joined += 1;
Code:if (GC.MyChar.Team1Joined >= 2;
if (GC.MyChar.MyTeam.Count == 2)
yes that is exactly what im trying to do :) ty for making it more clear but i still need help on actually making it i got close but still failed lmao... :) if i get it ill post itQuote:
No your wrong. He's wanting the players not to be able to enter, if the team already has 2. So then, one players joins, it adds 1, another joins it adds 1, u need to have it, so that its 2 and OVER, so noone can join if its 2 and over. if you dont put the check for >=2 , it will keep adding, and once it gets over 2, they will be able to join again.
u want me to write everything in details?Quote:
No your wrong. He's wanting the players not to be able to enter, if the team already has 2. So then, one players joins, it adds 1, another joins it adds 1, u need to have it, so that its 2 and OVER, so noone can join if its 2 and over. if you dont put the check for >=2 , it will keep adding, and once it gets over 2, they will be able to join again.
if (GC.MyChar.MyTeam.Count == 2)
{
//true = they can enter
}
else
{
//false = needs more members in team or got too many
}
and as for the public int Team1Joined = 0; && public int Team2Joined = 0; i would place that in Character.cs riteQuote:
Then when you have the NPC tele them to the map, you can use:Code:public int Team1Joined = 0; public int Team2Joined = 0;
andCode:GC.MyChar.Team1Joined += 1;
Then if someone is asking to join, you can use a if statement:Code:GC.MyChar.Team2Joined += 1;
Code:if (GC.MyChar.Team1Joined >= 2;
yes that is exactly what im trying to do ty for making it more clear but i still need help on actually making it i got close but still failed lmao... if i get it ill post itQuote:
No your wrong. He's wanting the players not to be able to enter, if the team already has 2. So then, one players joins, it adds 1, another joins it adds 1, u need to have it, so that its 2 and OVER, so noone can join if its 2 and over. if you dont put the check for >=2 , it will keep adding, and once it gets over 2, they will be able to join again.
When You Had Put ThisQuote:
u want me to write everything in details?
kthxbyeCode:if (GC.MyChar.MyTeam.Count == 2) { //true = they can enter } else { //false = needs more members in team or got too many }
it was giving me an error so i replaced it withQuote:
if (GC.MyChar.MyTeam.Count == 2)
Do You Think That Would Work?Quote:
if (GC.MyChar.MyTeam.Members.Count >= 2)
LoL well isnt that a method......... anyways uhm... ok so sinceQuote:
It won't really matter if you used :
if (GC.MyChar.MyTeam.Count == 2)
or:
if (GC.MyChar.MyTeam.Members.Count >= 2)
or you can try:
if (GC.MyChar.MyTeam.Count = 2)
Checks if u have the members now making it so u can only have 2 team at once would be MUCH harder :) id have to set up teams like how wat that previous guy was saying to add Teamjoined1 and team Joined2..Quote:
if (GC.MyChar.MyTeam.Members.Count >= 2)