local click = 0;
local second = false;

function ActionsJump ()
    
end;

function gameinput (sender,obj_id,attachedID)
-----------------------------------------------------------------------------------------------------------------------
    if sender==30 then --комикс завершился
      StopEmiter("dverka_lab");
      WriteToConsole("621 \n")
      StopAllEffects()
      setcurentleaf("electro",19,0); 
      SaveGame()
      
      flags.is_spirit = true;      
      flags.comics10 = true;
      --- устновка локов-------
    --  neighbors.comics15.lock=false;
      neighbors.stulja.lock=false;    
      neighbors.zarosli.lock=false;    
      neighbors.stol_police.lock=false;    
      neighbors.kucha.lock=false;    
      neighbors.chulan.lock=false;    
      neighbors.to_another_world.lock=false;    
      neighbors.parom.lock=false;    
      
      
      flags.first_duh_entert=true;
      -------------------------
      SetCurrentRM("menu");
      ReplaceObjectToWnd1("s","starost2",102,43,93,170,false)
      flags.starost_3 = true;
      SetCurrentRM("main");              
      Block_Show_Cur(false);
      ShowMenu(true);     
      Spirit_Particles()
      SetCursors()
      CreatePlashechka(900000,"3031")    
      if not flags.hidden_stulja_two then
        ActivateObject(6,true);
        Set_Anim_Cur(6,2);
        AddParticleToObject(6,"stulja",878,537);
        MoveEmiter("stulja",878,537);
        StartEmiter("stulja");
      end;      
    return;end;
    
    if sender == 15 then
      if obj_id == 4 then
      WriteToConsole("5 \n")
        speciale_action(2,4,true,1);
      return; end;
    return; end;
    
    if sender == 16 then
      if obj_id == 5 then
    WriteToConsole("6 \n")
        StartEmiter("to_duh");
        StartTimer(523,7);        
        StartTimer(223,6);
      return; end;
      if obj_id == 4 then 
      WriteToConsole("3 \n")
        speciale_action(2,4,true,1);
      return; end;
      if obj_id == 3 then  
        speciale_action(2,2,true);
      return; end;
      if obj_id == 2 then
        StartTimer(323,1.5);
      return; end;
    return; end;
    
    if sender == 100 then

      DeleteResource("comics10_1");
      DeleteResource("comics10_2");
      DeleteResource("comics10_3");
      DeleteResource("comics10_4");
      DeleteResource("comics10_5");
      DeleteResource("comics10_6");
      DeleteResource("comics10_9");
      clear_satelite_leaf("electro");
    return; end;
    
    if sender == 33 then  
      if finish then
        WaitRender();    
      end;
    return;end;
    
    if sender == 36 then
      if obj_id == 1123 then
       playeffect("kom_age");  
WriteToConsole("2 \n")       
        speciale_action(2,5,true,3);
        WriteToConsole("4 \n")
        StartTimer(623,2)
      return; end;
      if obj_id == 223 then
               -- StopEmiter("sm_comics1");    
        -- StopEmiter("sm_comics2");    
        -- StopEmiter("sm_comics3");

        
      speciale_action(2,3,true,2);
      return; end;
      if obj_id == 323 then
        speciale_action(2,2,true)    
        StartTimer(423,4.5)    
        WaitRender();
      return; end;
      if obj_id == 423 then
        WaitRender();
      return; end;     
      if obj_id==523 then
      
        StopEmiter("to_duh",true);
      return;end;
      if obj_id==623 then
        WriteToConsole("21 \n")
        speciale_action(2,6,true,3);
      return;end;
    return; end;
    
    if sender == 1 then --кликнули левой кнопкой мыши на активный объект
      WaitRender();
    return;end;

end
function SheetSwitched(nCount)
end;