
function gameinput (sender,obj_id,attachedID)
if sender==30 then
setcurentleaf("kabinet",21,0);
SwitchToSheet("re");
    whole_darkness=false;
    DarkScreen(true);
    SetAlfa(503,0,1,1);
    speciale_action(4,503);
return;end;
if sender==28 then

  if endmap and not maincomics then
    --endmap= false;
    maincomics=true;
    speciale_action(2,6109,true,0.008);
  return; end;
  if obj_id==6028 and not endmap then
    speciale_action(2,6201);
    speciale_action(2,6200);
    speciale_action(2,6062);
    speciale_action(2,6063);
    -- speciale_action(2,6045);
    -- speciale_action(2,6046);
    
    speciale_action(2,6021);
    speciale_action(2,6022);
    speciale_action(2,6029);
    -- speciale_action(2,6056);
    -- speciale_action(2,6057);
    speciale_action(2,6033);
    speciale_action(2,6064);
    speciale_action(2,6065);
    
    BlockCursor(false);
    Blocking= false;
    promuv= true;
  return; end;
  if obj_id==6106 and not endmap then
    MoveObjectX(6205,-1000,-412,3);
    
    MoveObjectX(6047,750-1000 ,750 -412,3);
    MoveObjectX(6021,1769-1000,1769-412,3);
    MoveObjectX(6022,1772-1000,1772-412,3);
    MoveObjectX(6045,745-1000,745-412,3);
    MoveObjectX(6046,750-1000,750-412,3);
    MoveObjectX(6056,796-1000,796-412,3);
    MoveObjectX(6057,799-1000,799-412,3);
    
    MoveObjectX(6005,182-1000 ,182-412,3);
    MoveObjectX(6002,249-1000 ,249-412,3);
    MoveObjectX(6027,1862-1000,1862-412 ,3);
    MoveObjectX(6028,1865-1000,1865-412 ,3);
    MoveObjectX(6008,197-1000 ,197-412 ,3);
    MoveObjectX(6034,971-1000 ,971-412 ,3);
    MoveObjectX(6038,1093-1000,1093-412,3);
    MoveObjectX(6026,1166-1000,1166-412,3);
    MoveObjectX(6017,1213-1000,1213-412 ,3);
    MoveObjectX(6033,968-1000,968-412 ,3);
    
    MoveObjectX(6064,1076-1000,1076-412,3);
    MoveObjectX(6065,1079-1000,1079-412,3);
    MoveObjectX(6062,1812-1000,1812-412,3);
    MoveObjectX(6063,1815-1000,1815-412,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;
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,6045);--
      -- speciale_action(2,6046);
      speciale_action(2,6057);
      speciale_action(2,6056);
      
      speciale_action(2,6038);
      speciale_action(2,6026);
      speciale_action(2,6017);
      speciale_action(2,6045);
      speciale_action(2,6046);
      
      speciale_action(2,6047);
    speciale_action(2,6021);
    speciale_action(2,6022);
    speciale_action(2,6028);
    speciale_action(2,6062);
    speciale_action(2,6063);
      speciale_action(2,6091);
      speciale_action(2,6034);
      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  --------------------------    
clear_satelite_leaf("kabinet");
    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==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,6200);
      speciale_action(2,1103);
      speciale_action(2,9999);
      -- speciale_action(2,6045);
      -- speciale_action(2,6046);
      endmap=true;
    return;end;
return; end;
end;
