ID:176219
Feb 6 2003, 5:27 pm
|
|
I need a good team demo or something. It has to have like so you can have equal teams and stuff.. well thx!
|
Feb 7 2003, 11:03 am
|
|
Actually, Kunark has just written a second RPGTutorial that has a nice example of forming groups. This, I'm sure, isn't exactly what you're going for, but it sure will point you in the right direction.
|
In response to Krosse
|
|
It has an example of grouping for experience groups, but the exact same method is easily used to make teams.
|
In response to Kunark
|
|
could you maybe just make a team demo because i looked at the coding and i dont see any kind of grouping.
|
In response to X0Gohan0X
|
|
all u gotta do is at the char creation make it so the var team is random and if its 1 they are on one team same for two and three...u could either add them to the teams list or make the var team say the team they are in...this isnt really hard if u think about it
|
In response to X0Gohan0X
|
|
It's in there... But this is basicly what the concept of it is:
Give the person a var, say var/team = "" Then, when the person logs in, let them choose the team they want to be in, and if they pick, lets say "Blue," set their team var like this: usr.team = "Blue" After that, when you want to check for who is on that team, you do this: for(var/mob/PC/M in world) if(M.team == "Blue") //Do blue stuff here. Or, if you wanted to check for what players are on his/her team, do this: for(var/mob/PC/M in world) if(M.team == usr.team) //Do "same team as me" stuff here. |
In response to Kunark
|
|
yeah but i need someting that will make its auto team balance.
|
I'm in a decently good mood right now so..:
var |
In response to Nadrew
|
|
thx alot man i tried figuring it out myself and got almost the same thing
|