
function gameinput (sender,obj_id,attachedID)
if sender==30 then
  setcurentleaf("garaj",8,0);
  whole_darkness=false;
  DarkScreen(true);
  SetAlfa(503,0,1,1);
  speciale_action(4,503)
  -- ShowMenu(true);
return;end;
if sender==28 then
  if endmap and not maincomics then
    maincomics=true;
    speciale_action(2,6109,true,0.008);
  return; end;
  if obj_id==6006 and not endmap then
    -- Blocking = false;  
    -- BlockCursor(false);
    speciale_action(2,6202);
    speciale_action(2,6201);
    speciale_action(2,6090);
    speciale_action(2,6030);
    speciale_action(2,6088);
    speciale_action(2,6089);
    C_Callaps(6088)
    speciale_action(2,6006);
    C_Callaps(6006)
    speciale_action(2,6007);
    BlockCursor(false);
    Blocking= false;
    promuv= true;
  return; end;
  if obj_id==6106 and not endmap then
    MoveObjectX(6205,-412,0,3);
    MoveObjectX(6006,194-412 ,194,3);
    MoveObjectX(6007,197-412 ,197,3);
    MoveObjectX(6030,131-412 ,131 ,3);
    MoveObjectX(6031,134-412 ,134 ,3);
    MoveObjectX(6034,971-412 ,971,3);
    MoveObjectX(6047,750-412 ,750,3);
    MoveObjectX(6038,1093-412,1093,3);
    MoveObjectX(6026,1166-412,1166,3);
    MoveObjectX(6017,1213-412,1213 ,3);
    MoveObjectX(6088,97-412 ,97-10,3);
    MoveObjectX(6089,101-412,101-10,3);
    MoveObjectX(6090,189-426,175,3);
    MoveObjectX(6091,192-426,178,3);
    speciale_action(2,9999);
    speciale_action(2,6104);
    speciale_action(2,6201);
    StartAnimation(9999)
    setcolor(1103,0,0,0,1,1);
    -- Blocking = false;  
    -- BlockCursor(false);
    maping=true;    
  return;end;
  if obj_id==1 then
      if frame==8 or skip then
      BlockCursor(false);
        SetAlfa(-33,1,0,2.5);
        clear_satelite_leaf("garaj");
      return;end;
      if frame==0 then
        speciale_action(2,11,true);        
        BlockCursor(false);
        MoveObjectX(3,1024,600,2);   
        MoveObjectX(2,-300,76,2);    
      return;end;  
    return;end;
    if obj_id==3 then
      if frame==0 then
        ScaleObject(2,1,1.1)
        setcolor(3,0.6,0.6,0.6,1); 
      return;end;  
    return;end;
return;end;
if sender==29 then -- отработал скейл
     if obj_id==2 then
      if frame==0 then
        setcolor(1100,1,1,1,1,1);
        speciale_action(2,16);
        -- speciale_action(2,11,true);
        BlockCursor(false);
        Blocking= false;
        Blocking2= false;
      return; end;
     return;end;
  return;end;
if sender==16 then
    if obj_id<6140 and obj_id>=6109 then------------------------------------------------------
      speciale_action(2,obj_id+1,true,0.00001);-----------------------------------------------
    return; end;--------
    if obj_id==6140 then-------------------------------
      speciale_action(2,6088);
      speciale_action(2,6089);
      speciale_action(2,6007);
      speciale_action(2,6006);
      speciale_action(2,6031);
      speciale_action(2,6034);
      speciale_action(2,6017);
      speciale_action(2,6047);
      speciale_action(2,6091);
      speciale_action(2,6205,true,0.008);
    return; end;
  return; end;
  if sender==15 then
    if obj_id>6109 and obj_id<=6140 then----------------------------
      speciale_action(2,obj_id-1,true,0.00001);
    return; end;
    if obj_id==6205 then
      speciale_action(2,6140,true,0.00001);
    return; end;
    if obj_id==6109 then  --------------------------
      MoveObjectY(1,-384,-200,2);
      MoveObjectY(12,768,768-200,2);
      SetAlfa(-33,1,0,2.5);
      BlockCursor(true);
      addtexttogame(1100,161,618,"250",680);
      setcolor(1100,1,1,1,0,1);
      speciale_action(4,1100);
    return; end;
  return; end;
    if pause_state then
    if sender==1 or sender==6 or sender==14 then
    pause_state=false;
    --set_visible_object(11111,false);
    end;
  return;end;
  if sender == 1 then --кликнули левой кнопкой мыши на активный объект
    if obj_id==11 then
      skip=true;
      EndComiks()
    return;end;    
  return;end;

if sender==6 then
    if maping and promuv then
      maping=false;
      MoveObjectY(6105,-3,-521,1);
      Blocking = true;
      MoveObjectY(6106,768-115,768+115,1);
      speciale_action(2,6104);
      speciale_action(2,6202);
      speciale_action(2,1103);
      speciale_action(2,9999);
      endmap=true;
    return;end;
    if not Blocking then
    if not Blocking2 then
      frame=frame+1;
      if frame==1  then 
        ScaleObject(2,1.1,1)
        setcolor(2,0.6,0.6,0.6,1);
        ScaleObject(3,1,1.1)
        setcolor(3,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);        
        set_text(1100,"251"); 
      return;end;
      if frame==2 then 
          ScaleObject(3,1.1,1)
        setcolor(3,0.6,0.6,0.6,1);
        ScaleObject(2,1,1.1)
        setcolor(2,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"252"); 
      return;end;
      if frame==3 then 
          ScaleObject(2,1.1,1)
        setcolor(2,0.6,0.6,0.6,1);
        ScaleObject(3,1,1.1)
        setcolor(3,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"253");
      return;end;
      if frame==4 then 
          ScaleObject(3,1.1,1)
        setcolor(3,0.6,0.6,0.6,1);
        ScaleObject(2,1,1.1)
        setcolor(2,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"254");
      return;end;
      if frame==5 then 
          ScaleObject(2,1.1,1)
        setcolor(2,0.6,0.6,0.6,1);
        ScaleObject(3,1,1.1)
        setcolor(3,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"255");
      return;end;
        if frame==6 then 
        ScaleObject(3,1.1,1)
        setcolor(3,0.6,0.6,0.6,1);
        ScaleObject(2,1,1.1)
        setcolor(2,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"256");
      return;end;
      if frame==7 then 
          ScaleObject(2,1.1,1)
        setcolor(2,0.6,0.6,0.6,1);
        ScaleObject(3,1,1.1)
        setcolor(3,1,1,1,1); 
        speciale_action(2,34);
        speciale_action(2,16);
        set_text(1100,"257");
      return;end;        
      if frame==8 then 
        EndComiks()
      return;end;  
      return;end;  
      
    return; end;
return; end;
end;
function EndComiks()
  MoveObjectY(1,-200,-385,2);
  MoveObjectY(12,610,768,2);
  MoveObjectX(3,600,1024,1.5);   
  MoveObjectX(2,76,-350,1.5);  
  BlockCursor(true);
  speciale_action(2,11);
  SetAlfa(16,1,0,0.1);
  SetAlfa(34,1,0,0.1);
  -- setcolor(1100,1,1,1,0,1);  
  speciale_action(2,1100);
    addfade(-33,0);       
    speciale_action(4,-33);
  SetAlfa(-33,0,1,2.5);
end;