Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 07:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Question]2vs2 PK match

Discussion on [Question]2vs2 PK match within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
ftp4life's Avatar
 
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?
ftp4life is offline  
Old 08/05/2010, 18:51   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Cant be hard. Logic is the answer for that I think.
_DreadNought_ is offline  
Old 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
Fish* is offline  
Thanks
1 User
Old 08/05/2010, 19:12   #4
 
.Beatz's Avatar
 
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
.Beatz is offline  
Old 08/05/2010, 20:23   #5
 
ftp4life's Avatar
 
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
ftp4life is offline  
Old 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 View Post
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.
pro4never is offline  
Thanks
3 Users
Old 08/06/2010, 00:22   #7
 
ftp4life's Avatar
 
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
ftp4life is offline  
Old 08/06/2010, 00:57   #8
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by ftp4life View Post
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
Fish* is offline  
Old 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;
rblazed12601 is offline  
Old 08/06/2010, 01:07   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by rblazed12601 View Post
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)
Fish* is offline  
Old 08/06/2010, 01:16   #11
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by ThoughtZ View Post
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
}
Fish* is offline  
Old 08/06/2010, 01:32   #12
 
ftp4life's Avatar
 
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
Quote:
Originally Posted by ThoughtZ View Post
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
ftp4life is offline  
Old 08/06/2010, 01:34   #13
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by ThoughtZ View Post
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
Fish* is offline  
Old 08/06/2010, 01:35   #14
 
ftp4life's Avatar
 
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
Quote:
Originally Posted by rblazed12601 View Post
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 View Post
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 View Post
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?
ftp4life is offline  
Old 08/06/2010, 02:00   #15
 
ftp4life's Avatar
 
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
Quote:
Originally Posted by ThoughtZ View Post
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..
ftp4life is offline  
Reply


Similar Threads 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 07:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.