on leavebuilding(b,un) do
begin
if b=yeltoblu then
        case un of
        un: begin
             teleportunit(un,225,175,9,false);
             setside(un,getside(blu));
 
     end;
     end;

     if b=yeltoora then
        case un of
        un: begin
             teleportunit(un,25,20,5,false);
             setside(un,getside(ora));

     end;
     end;

     if b=yeltowhi then
        case un of
        un: begin
             teleportunit(un,150,25,5,false);
             setside(un,getside(whi));

     end;
     end;
     if b=blutoyel then
        case un of
        un: begin
             teleportunit(un,90,130,5,false);
             setside(un,getside(yel));

     end;
     end;
     if b=blutoora then
        case un of
        un: begin
             teleportunit(un,25,20,5,false);
             setside(un,getside(ora));

     end;
     end;
     if b=blutowhi then
        case un of
        un: begin
             teleportunit(un,150,25,5,false);
             setside(un,getside(whi));

     end;
          end;
          if b=oratoyel then
        case un of
        un: begin
             teleportunit(un,90,130,5,false);
             setside(un,getside(yel));

     end;
          end;
          if b=oratoblu then
        case un of
        un: begin
             teleportunit(un,225,175,9,false);
             setside(un,getside(blu));

     end;
          end;
          if b=oratowhi then
        case un of
        un: begin
             teleportunit(un,150,25,5,false);
             setside(un,getside(whi));

     end;
          end;
               if b=whitoyel then
        case un of
        un: begin
             teleportunit(un,90,130,5,false);
             setside(un,getside(yel));

     end;
          end;
               if b=whitoblu then
        case un of
        un: begin
             teleportunit(un,225,175,9,false);
             setside(un,getside(blu));

     end;
          end;
               if b=whitoora then
        case un of
        un: begin
             teleportunit(un,25,20,5,false);
             setside(un,getside(ora));

     end;
  end;
     end;