Over my school's Spring Break I'm going to make a "sports bar" that features tag-team type sparring rooms. But before I program the rooms, I'd like to know:
1) How do I assign an index to a specific player?
2) How do I assign an index to a specific group of players?
3) Once I assign the index, how would I be able to change the player/group of players that the index refers to?
I'd appreciate it if you answer any or all of these questions. Thanx!
Well basically you can use indexes in the following way:
NPC Code:
if (playerenters||timeout) {
for (this.i=0;this.i<playescount;this.i++) {
/*Here you can always check for a player with for
example a specific flag if he is in a certain position by
for example using if (players[this.i].x==x)*/
}
timeout = 0.05;
}