I want to know If the following is possible in a HL2 map. Its pretty complex to get your head round first time, so please read it through a few times untill you understand exactly how its supposed to work.
I have a 3 by 3 array of cubes. That is, 9 cubes total, organised into a 3D structure consisting of 3 cubes deep, 3 cubes tall and 3 cubes wide. In between all of those cubes are smaller cubes, meaning there are 9 large 'Room Cubes' and 48 'teleport cubes'.
If you ignore the BLUE room cubes in the below picture, you should get the idea. The cubes with the coloured borders are 'Room cubes', inside which players can spawn and fight. The smaller 'connector' cubes connect all of the large cubes, and are refered to as 'teleporter' zones. Note: I've added coordiates to some of the boxes above so it helps to identify what I'm talking about below.
When a player touches any 'teleporter' zone from within any room cube, they are to be transported to a RANDOM "unlocked" room cube.
Lets take an ideal case here... We have 9 room cubes, and 9 players. Using 3D co-ordinates, we have a strucure that goes from 0,0,0 [the bottom left lime green cube] to 2,2,2 [The top right 'white/black' dashed cube] (where 1,1,1 is the turquoise cube in the middle of the entire structure).
Lets say the player in cube 0,0,0 touches one of the teleporter zone cubes connected to his or her room cube, they are then transported to a random room cube - for arguments sake, lets say this happens to be 2,2,2. When in 2,2,2, they encounter an enemy. They frag this enemy. We are now left with 8 players and 9 rooms. The system should now identify this, and prevent an empty cube (in this instance, only 0,0,0 is empty) being teleported into. So, 8 players left, 8 possibilities for the next random teleportation - 0,0,1 through 2,2,2
The same system continues until there are two room cubes and two players left. At the next teleportation, the final cube becomes inaccessible, and the last two users complete the round by killing their opponent.
At the end of the round, all room cubes become accessible again, people respawn, and the whole thing starts again.
Can this be done?