|
You last visited: Today at 00:31
Advertisement
[Question]2vs2 PK match
Discussion on [Question]2vs2 PK match within the CO2 Private Server forum part of the Conquer Online 2 category.
08/05/2010, 17:39
|
#1
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
[Question]2vs2 PK match
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?
|
|
|
08/05/2010, 18:51
|
#2
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Cant be hard. Logic is the answer for that I think.
|
|
|
08/05/2010, 19:01
|
#3
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
For 5165 (You might need to edit this so it works):
Code:
//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
}
please test it
|
|
|
08/05/2010, 19:12
|
#4
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Ok simple answer to this..... take Team PK Tourey as an example. Shouldnt be too hard to work out just use some common sense and google. If you got any questions or get stuck just ask the epvpers  we are always here to help
|
|
|
08/05/2010, 20:23
|
#5
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
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
|
|
|
08/05/2010, 20:46
|
#6
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Quote:
Originally Posted by ftp4life
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
|
So I don't use lotf much but here's my 2 cents...
Checking team can be done through checking the team structure (duhh)
What I'd do is check that it only has 2 people in it (leader and team member). Then allow the player to enter the name of another team leader to challenge. Then send them a npc text asking if they accept. If they do, send them to the new map and set up the character variables for the pk event. I'd make it so players cannot leave/change teams during the event to avoid problems like that and if any of them dc/change map somehow then the event ends and all players are kicked out.
To check team is something like
GC.MyChar.Team.Members.Count
members is an array list, team is the structure holding all team variables. Count will obviously count them up.
Best of luck.
Ooh: And Leader is a bool that specifies if the char is the leader
if(GC.MyChar.Team.Leader == GC.MyChar.UID)
or something like that.
|
|
|
08/06/2010, 00:22
|
#7
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
yes that wuld make more sense oh yea id add that into the NPC right
|
|
|
08/06/2010, 00:57
|
#8
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by ftp4life
yes that wuld make more sense oh yea id add that into the NPC right
|
try and see if it works.
if dosn't then it is the wrong place
|
|
|
08/06/2010, 01:02
|
#9
|
elite*gold: 0
Join Date: May 2009
Posts: 22
Received Thanks: 1
|
Code:
public int Team1Joined = 0;
public int Team2Joined = 0;
Then when you have the NPC tele them to the map, you can use:
Code:
GC.MyChar.Team1Joined += 1;
and
Code:
GC.MyChar.Team2Joined += 1;
Then if someone is asking to join, you can use a if statement:
Code:
if (GC.MyChar.Team1Joined >= 2;
|
|
|
08/06/2010, 01:07
|
#10
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by rblazed12601
Code:
public int Team1Joined = 0;
public int Team2Joined = 0;
Then when you have the NPC tele them to the map, you can use:
Code:
GC.MyChar.Team1Joined += 1;
and
Code:
GC.MyChar.Team2Joined += 1;
Then if someone is asking to join, you can use a if statement:
Code:
if (GC.MyChar.Team1Joined >= 2;
|
is a waste, when it is done by one line.
Code:
if (GC.MyChar.MyTeam.Count == 2)
|
|
|
08/06/2010, 01:16
|
#11
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by ThoughtZ
You can't use "==" cause when it goes over 2, it will still be accepting them into the match, you need to use ">= 2".
|
ur wrong. using >= means if it is 2 or over. and it needs to be 2 to enter.
Code:
if (GC.MyChar.MyTeam.Count == 2)
{
//true
}
else
{
//false
}
|
|
|
08/06/2010, 01:32
|
#12
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
Quote:
Originally Posted by ThoughtZ
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.
|
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 it
|
|
|
08/06/2010, 01:34
|
#13
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by ThoughtZ
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?
Code:
if (GC.MyChar.MyTeam.Count == 2)
{
//true = they can enter
}
else
{
//false = needs more members in team or got too many
}
kthxbye
|
|
|
08/06/2010, 01:35
|
#14
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
Quote:
Originally Posted by rblazed12601
Code:
public int Team1Joined = 0;
public int Team2Joined = 0;
Then when you have the NPC tele them to the map, you can use:
Code:
GC.MyChar.Team1Joined += 1;
and
Code:
GC.MyChar.Team2Joined += 1;
Then if someone is asking to join, you can use a if statement:
Code:
if (GC.MyChar.Team1Joined >= 2;
|
and as for the public int Team1Joined = 0; && public int Team2Joined = 0; i would place that in Character.cs rite
Quote:
Originally Posted by ThoughtZ
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.
|
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 it
Quote:
Originally Posted by grillmad
u want me to write everything in details?
Code:
if (GC.MyChar.MyTeam.Count == 2)
{
//true = they can enter
}
else
{
//false = needs more members in team or got too many
}
kthxbye
|
When You Had Put This
Quote:
|
if (GC.MyChar.MyTeam.Count == 2)
|
it was giving me an error so i replaced it with
Quote:
|
if (GC.MyChar.MyTeam.Members.Count >= 2)
|
Do You Think That Would Work?
|
|
|
08/06/2010, 02:00
|
#15
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
Quote:
Originally Posted by ThoughtZ
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)
|
LoL well isnt that a method......... anyways uhm... ok so since
Quote:
|
if (GC.MyChar.MyTeam.Members.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..
|
|
|
 |
|
Similar Threads
|
2vs2 Partner gesucht...
08/04/2010 - Starcraft 2 - 3 Replies
Hey mir gehen diese Randoms total auf die Nüsse. Entweder immer dc oder leaven oder oder oder -.- (3vs3 - 16Games - 1win...)
Gibt es hier jemand der 2vs2 noch kein Partner hat und in noch keiner Liga ist?
Weil ich hab 2vs2 noch frei und will mir das net versauen :/
|
1vs1 o 2vs2
05/29/2010 - WarRock - 8 Replies
na hat jemand hier lust zu zocken?? 1gg1 oder 2gg2 meldet euch einfach mal^^
|
Arena 2vs2 Guide!
12/27/2006 - WoW Guides & Templates - 6 Replies
Hi there, found this:
2v2
~Druid & Rogue~
Probably the best duo for arena's. Since they both can stealth, you can take a limited amount of time walking around and waiting for the perfect chance to jump the two. If there is a healer on the team, target them first. Same with any type of casters, because they get in the way. Once they are down, close in on the other. If the rogue is starting to become low on health, the druid should go out of cat/bear form and start healing. Thats the main...
|
All times are GMT +1. The time now is 00:31.
|
|