SetActivLeaf("turma");
Spirit_Particles()
Korridor={
644,151,
782,151,
782,409,
644,409
}

Hidden={
439,133,
556,133,
556,447,
439,447
}

Lock={
122,246,
185,246,
185,360,
122,360
}

ToCell={
140,27,
259,57,
265,567,
139,655
}

Luk_Prison={
416,571,
517,492,
700,499,
674,570
}

Back={
482,601,
1024,601,
1024,768,
482,768
}
AddObjForCur()
add_animation(121)
add_animation_frame(121,"turma_rat",0,600,0  ,0  ,105,49,0.05);
add_animation_frame(121,"turma_rat",0,600,105,0  ,105,49,0.05);
add_animation_frame(121,"turma_rat",0,600,210,0  ,105,49,0.05);
add_animation_frame(121,"turma_rat",0,600,315,0  ,105,49,0.05);
add_animation_frame(121,"turma_rat",0,600,0  ,0  ,105,49,0.05);
StartAnimation(121)
flyRat = {"InstantiationOfLine", 2, 108, 768, 1024, 580, 5, false};
StartTravel(121,1,nil,nil,flyRat);

StartTimer(1221,25)

addstaticobjecttogame(40,"turmag",953 ,800,"",0,0,15,28);
addstaticobjecttogame(41,"turmag",71 ,800,"",15,0,15,28);
addstaticobjecttogame(42,"turmag",71 ,800,"",15,0,15,28);

t_gad1 = {"InstantiationOfLine", 2, 55,708, 55, -100, 20, true};
t_gad2 = {"InstantiationOfLine", 2,530, 85,880,  85, 25, true};
t_gad3 = {"InstantiationOfLine", 2,941,465,1000,165, 15, true};

StartTravel(41,1,nil,nil,t_gad2);
StartTimer(3219999,3)
StartTimer(3239999,2)
speciale_action(2,40)
speciale_action(2,42)

addstaticobjecttogame(1,"turma",409,302,"",0,700,299,279); --люк открыт
speciale_action(2,1);

CreatePolygon(2,4,"Luk_Prison")


addstaticobjecttogame(3,"turma",254,22 ,"",733,0,159,639); --дверь открыта
speciale_action(2,3);

CreatePolygon(12,4,"Lock")

addstaticobjecttogame(4,"turma",111,22 ,"",0,0,733,700); --дверь закрыта

addactivobjecttogame(5,"turma",935,125,"","",0,0,299,700,89,307); --пыль на стене
set_pixel_check(5,false);

CreatePolygon(7,4,"Back")


CreatePolygon(8,4,"Korridor")


CreatePolygon(10,4,"Hidden")


CreatePolygon(11,4,"ToCell")
speciale_action(2,11);
addstaticobjecttogame(6,"turma5",0  ,0  ,""); --бг

addfade(501,0);

turluk=false

if flags.luk_turma_openM then
    turluk=true;
    speciale_action(2,1);
    speciale_action(10,1);    
end;



if flags.hidden_reshetka then
  ActivateObject(10,false);
end;



if flags.stenka then
  speciale_action(2,5);
end;



if flags.zamok_kamera then
  speciale_action(2,12);
  speciale_action(2,11);
  speciale_action(2,3);
  speciale_action(2,4);
end;


if flags.hidden_reshetka_dwa then
  ActivateObject(10,false);
end;



if flags.luk_turma then
  speciale_action(2,2);
  if not turluk then
  turluk=true;
  speciale_action(2,1);
  end;
end;