Index: /experiments/frams/capture-the-flag/data/scripts/capture-the-flag.expdef
===================================================================
--- /experiments/frams/capture-the-flag/data/scripts/capture-the-flag.expdef	(revision 484)
+++ /experiments/frams/capture-the-flag/data/scripts/capture-the-flag.expdef	(revision 485)
@@ -89,5 +89,5 @@
 	var pool=GenePools[0];
 	pool.name = "Team1";
-   	pool.fitness = "return this.user3;";
+   	pool.fitness = "return 0;";
    	while (pool.size > 0)
    		pool.delete(0);
@@ -111,5 +111,5 @@
     	pop.othermask = 0x60001;
 		pool=GenePools.addGroup("Team"+i);
-		pool.fitness = "return this.user3;";	
+		pool.fitness = "return 0;";
 	}
 	
@@ -208,7 +208,7 @@
 		cr.signals[0].flavor = team;
 		cr.signals[0].power=1000;
-		cr.user1 = 0;
-		cr.user2 = 0;
-		cr.user3 = 0;
+		cr.data->taken = 0;
+		cr.data->owner = 0;
+		cr.data->cooldown = 0;
 		
 		var crX, crY;
@@ -228,7 +228,7 @@
 				crY = -5;
 			cr.moveAbs(flagsX[team] + crX, flagsY[team] + crY, 0);
-			cr.user1 = 0;
-			cr.user2 = 0;
-			cr.user3 = 0;
+			cr.data->holding = 0;
+			cr.data->flag = 0;
+			cr.data->score = 0;
 		}
 	}
@@ -256,11 +256,11 @@
 	        var pop=Populations[team];
 
-		if (pop[0].user3 > 0)
-			pop[0].user3 -= 1;
+		if (pop[0].data->cooldown > 0)
+			pop[0].data->cooldown -= 1;
 		
 		for (player = 1; player < pop.size; player++){
 			var cr=pop[player];
-			if (cr.user1 == 1){
-				cr.user2.moveAbs(cr.pos_x, cr.pos_y, cr.size_z + 1);
+			if (cr.data->holding == 1){
+				cr.data->flag.moveAbs(cr.pos_x, cr.pos_y, cr.size_z + 1);
 			}
 		}
@@ -288,16 +288,16 @@
 function takeFlag(flag, creature){
 	//If the cooldown is on - do nothing
-	if (flag.user3 > 0)
+	if (flag.data->cooldown > 0)
 		return;
 	
 	//Take flag by changing its flavour and setting flag in player and player in flag fields
 	flag.signals[0].flavor = flag.population.index + 100;
-	flag.user1 = 1;
-	flag.user2 = creature;
-	creature.user1 = 1;
-	creature.user2 = flag;
+	flag.data->taken = 1;
+	flag.data->owner = creature;
+	creature.data->holding = 1;
+	creature.data->flag = flag;
 	
 	//Score points for taking a flag
-	creature.user3 += ExpProperties.pointsCapture;
+	creature.data->score += ExpProperties.pointsCapture;
 	
 //	Simulator.print("Flag "+(flag.group.index+1)+" taken by team "+(creature.group.index+1));
@@ -312,18 +312,18 @@
 	//Retrieve flag by changing its flavour and deleting it from player and player from flag
 	flag.signals[0].flavor = flag.population.index;
-	flag.user1 = 0;
-	
-	flag.user2.user1 = 0;
-	flag.user2.user2 = 0;
-	
-	flag.user2 = 0;
+	flag.data->taken = 0;
+	
+	flag.data->owner.data->holding = 0;
+	flag.data->owner.data->flag = 0;
+	
+	flag.data->owner = 0;
 	
 	//Set cooldown for taking a flag
-	flag.user3 = 1000;
+	flag.data->cooldown = 1000;
 	
 	placeFlag(flag);
 
 	//Score points for retrieving a flag
-	creature.user3 += ExpProperties.pointsRetrieve;
+	creature.data->score += ExpProperties.pointsRetrieve;
 	
 //	Simulator.print("Flag "+ (flag.group.index+1) +" retrieved");
@@ -336,15 +336,15 @@
 function scoreFlag(flag, creature){
 	//Put the flag back on its spot and delete references between player and flag
-	creature.user2.signals[0].flavor = creature.user2.population.index;
-	creature.user2.user1 = 0;
-	creature.user2.user2 = 0;
-	
-	placeFlag(creature.user2);
-	
-	creature.user1 = 0;
-	creature.user2 = 0;
+	creature.data->flag.signals[0].flavor = creature.data->flag.population.index;
+	creature.data->flag.data->taken = 0;
+	creature.data->flag.data->owner = 0;
+	
+	placeFlag(creature.data->flag);
+	
+	creature.data->holding = 0;
+	creature.data->flag = 0;
 	
 	//Score points for scoring a flag
-	creature.user3 += ExpProperties.pointsScoring;
+	creature.data->score += ExpProperties.pointsScoring;
 	
 //	Simulator.print("Team "+ (creature.group.index + 1) +" scored");
@@ -382,11 +382,11 @@
 	if (colFlag == 1){
 		//Collision with my flag which is taken
-		if (flag.population.index == creature.population.index && flag.user1 == 1){
+		if (flag.population.index == creature.population.index && flag.data->taken == 1){
 			retrieveFlag(flag, creature);
 		} //Collision with my flag which is not taken while carrying another team's flag 
-		else if (flag.population.index == creature.population.index && flag.user1 == 0 && creature.user1 == 1 && flag.user3 != 1){
+		else if (flag.population.index == creature.population.index && flag.data->taken == 0 && creature.data->holding == 1 && flag.data->cooldown != 1){
 			scoreFlag(flag, creature);
 		} //Collision with another team's flag which is not taken while not carrying any flag 
-		else if (flag.population.index != creature.population.index && flag.user1 == 0 && creature.user1 == 0 && flag.user3 != 1){
+		else if (flag.population.index != creature.population.index && flag.data->taken == 0 && creature.data->holding == 0 && flag.data->cooldown != 1){
 			takeFlag(flag, creature);
 		}
@@ -397,17 +397,17 @@
 		if (c1.population.index != c2.population.index){
 			//If player 1 has a flag ...
-			if (c1.user1 == 1){
+			if (c1.data->holding == 1){
 				// ... and the flag is of my team ...
-				if (c2.population.index == c1.user2.population.index){
+				if (c2.population.index == c1.data->flag.population.index){
 					//... retrieve it
-					retrieveFlag(c1.user2, c2);
+					retrieveFlag(c1.data->flag, c2);
 				}
 			}
 			//If player 2 has a flag ...
-			if (c2.user1 == 1){
+			if (c2.data->holding == 1){
 				// ... and the flag is of my team ...
-				 if (c1.population.index == c2.user2.population.index){
+				 if (c1.population.index == c2.data->flag.population.index){
 					//... retrieve it
-					retrieveFlag(c2.user2, c1);
+					retrieveFlag(c2.data->flag, c1);
 				}
 			}
