function gameinput (sender,obj_id,attachedID)
-----------------------------------------------------------------------------------------------------------------------

	if sender == 100 then
		delete_tree_leaf("Root","comics");
		setnextlavel(1);
		loadlavel();	
	
	return;end;
	
	if sender==15 then
	
		if obj_id==-30 then
		--	BlockCursor(false);
		return;end;

		if obj_id==-31 then
		--	BlockCursor(false);
			block=false;
			ScaleObject(3,0.9,1);
			speciale_action(2,16);
			setcolor(1100,1,1,1,1,1);
			set_text(1100,"261");
			setcolor(2,0.6,0.6,0.6,1);
			setcolor(3,1,1,1,1); 
		return;end;
		
		if obj_id==-33 then
		--	BlockCursor(false);
		    MoveObjectX(32,-300,366,3);
			playeffect("Bike2");
			MoveObjectX(35,-286,380,3);	
			MoveObjectX(36,-110,556,3);	
		return;end;

		if obj_id==-34 then
			--BlockCursor(false);
			block=false;
			ScaleObject(2,1,0.9);
			ScaleObject(5,0.9,1);
			setcolor(2,0.6,0.6,0.6,1);
			setcolor(5,1,1,1,1); 
			setcolor(1100,1,1,1,1,1);				
			set_text(1100,"250");
			speciale_action(2,15);
		return;end;		
		
		if obj_id==-32 then
			-- BlockCursor(false);
			-- ScaleObject(2,1,0.9);
			-- ScaleObject(5,0.9,1);
			-- setcolor(2,0.6,0.6,0.6,1);
			-- setcolor(5,1,1,1,1); 
			-- setcolor(1100,1,1,1,1,1);				
			-- set_text(1100,"250");
			-- speciale_action(2,15);		
		--	BlockCursor(false);
		return;end
		
		if obj_id==30 then
			unvisible_object(-31);
		return;end

		if obj_id==4 then
			unvisible_object(-32);
		return;end;
		
	return;end;
	
	if sender==16 then
		if obj_id==30 then
			unvisible_object(-30);
--			del_object_from_game(-30);
			MoveObjectX(25,-300,366,3);	
			playeffect("Bike2");			
			MoveObjectX(34,-286,380,3);	
			MoveObjectX(33,-110,556,3);	
		return;end;		
		
		if obj_id==27 then
			unvisible_object(-33);
			--MoveObjectX(25,-300,366,3);		
		return;end;
	
		if obj_id==5 then
			unvisible_object(-34);
		return;end;

		
		if obj_id==-30 then
			if frame==-2 then
				speciale_action(2,20);
				speciale_action(2,21);
				speciale_action(2,70);
				speciale_action(2,23);
				speciale_action(2,24);			
				speciale_action(2,25);
				speciale_action(2,30,true);
			return;end;	
		return;end;
		
		if obj_id==-31 then
		--	speciale_action(2,25,true);
			speciale_action(2,30,true);
			frame=frame+1;
		return;end;	

		if obj_id==-32 then
			speciale_action(2,3);
			speciale_action(2,4,true);
			speciale_action(2,20);
			speciale_action(2,31);
			speciale_action(2,70);
			MoveObjectX(70,420,420,1)
			MoveTexture(70,0.0,-0.009);
			speciale_action(2,23);
			speciale_action(2,24);				
			speciale_action(2,2);
		return;end;	
		
		if obj_id==-33 then
			-- speciale_action(2,20);
			-- speciale_action(2,31);
			-- speciale_action(2,70);
			-- speciale_action(2,23);
			-- speciale_action(2,24);	
			speciale_action(2,2);			
			speciale_action(2,3);
			speciale_action(2,4,true);
			speciale_action(2,27,true);
			speciale_action(2,35)
			speciale_action(2,36)
			speciale_action(2,32)
		return;end;

		if obj_id==-34 then	
			speciale_action(2,27);
			--speciale_action(2,32);
			speciale_action(2,2);
			speciale_action(2,5,true);
		return;end;
		

	return;end;
	
	if sender==29 then
		if obj_id==30 then		
			
			addfade(-31,0);		
			visible_object(-31);
			speciale_action(4,-31);	
		return;end;			
		
		if obj_id==27 then
			addfade(-34,0);		
			visible_object(-34);
			speciale_action(4,-34);			
		return;end;
	return;end;
	
	
	if sender==28 then
	
		if flags.skip then
			WaitRender();
		return;end;
		
		if obj_id==1 then
			if frame==-2 then
			--	BlockCursor(false);
				speciale_action(2,11);
				MoveObjectX(25,-300,366,3);		
				playeffect("Bike2");
				MoveObjectX(34,-286,380,3);	
				MoveObjectX(33,-110,556,3);	
				-- MoveObjectX(3,-400,76,3);
				-- MoveObjectX(2,1024,600,3);
				--framefinish=true;	
				--frame=frame+1;	
			return;end;
			if frame==13 then
			 --   BlockCursor(false);
				block=false;
				WaitRender();
			return;end;
		return;end;		
	
		if obj_id==25 then
			speciale_action(2,25)
			speciale_action(2,34)
			speciale_action(2,33)
			MoveObjectX(34,-286,-286)
			MoveObjectX(33,-110,-100)				
			ScaleObject(30,1,1.2);
			frame=frame+1;
		return;end;
		
		if obj_id==32 then
			speciale_action(2,32)
			speciale_action(2,35)
			speciale_action(2,36)	
			MoveObjectX(35,-286,-286)
			MoveObjectX(36,-110,-100)			
			ScaleObject(27,1,1.2);
			frame=frame+1;
		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 not block then
	--	if obj_id==10 then
		    frame=frame+1;
			if frame==-2 then
				--BlockCursor(true);
				block=true;
				addfade(-30,0);
				visible_object(-30);		
				speciale_action(4,-30);       
			return;end;

			-- if frame==-1 then
				-- BlockCursor(true);
				-- speciale_action(2,25)
				-- ScaleObject(30,1,1.2);
			-- return;end;
			
			if frame==1 then 
			    DeleteResource("cm0030");
				speciale_action(2,16);
				speciale_action(2,14);
			    ScaleObject(3,1,0.9);
				ScaleObject(2,0.9,1);
				setcolor(3,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 
				set_text(1100,"262");
			return; end;
			if frame==2 then 
				speciale_action(2,16);
				speciale_action(2,14);			
			    ScaleObject(2,1,0.9);
				ScaleObject(3,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(3,1,1,1,1); 
				set_text(1100,"263");
			return; end;
			if frame==3 then 
				speciale_action(2,16);
				speciale_action(2,14);			
				ScaleObject(3,1,0.9);
				ScaleObject(2,0.9,1);
				setcolor(3,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 
				set_text(1100,"264");
				frame=frame+1;
			return; end;
			
		
			
			if frame==5 then 
              --  BlockCursor(true);	
				block=true;	
                speciale_action(2,14);	
				frame=frame+1;			
				-- addfade(-32,0);		
				-- visible_object(-32);
				-- speciale_action(4,-32);	
				addfade(-33,0);		
				visible_object(-33);
				speciale_action(4,-33);	
				setcolor(1100,1,1,1,0,1); 
			return; end;	
			
			if frame==6 then	
              --  BlockCursor(true);	
				block=true;				
				addfade(-33,0);		
				visible_object(-33);
				speciale_action(4,-33);	
			return;end;	
			if frame==7 then 
                --BlockCursor(true);	
				block=true;	

			return; end;
			
			if frame==8 then 
				DeleteResource("cm0027");
				DeleteResource("cm0025");
				DeleteResource("cm0032");
				DeleteResource("cm0033");
			    ScaleObject(5,1,0.9);
				ScaleObject(2,0.9,1);
				setcolor(5,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 			
				set_text(1100,"251");
				speciale_action(2,15);	
				speciale_action(2,14);	
			return; end;
			if frame==9 then 
			    ScaleObject(2,1,0.9);
				ScaleObject(5,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(5,1,1,1,1); 				
				set_text(1100,"252");
				speciale_action(2,15);	
				speciale_action(2,14);					
			return; end;
			if frame==10 then 
			    ScaleObject(5,1,0.9);
				ScaleObject(2,0.9,1);
				setcolor(5,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 			
				set_text(1100,"253");
				speciale_action(2,15);	
				speciale_action(2,14);					
			return; end;
			if frame==11 then 
			    ScaleObject(2,1,0.9);
				ScaleObject(5,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(5,1,1,1,1); 				
				set_text(1100,"254");
				speciale_action(2,15);	
				speciale_action(2,14);	
				frame=frame+1;
			return; end;

			if frame==13 then 
				--BlockCursor(true);
				block=true;
				speciale_action(2,1100);
				MoveObjectY(1,-200,-385,2);
				speciale_action(2,11);
				MoveObjectY(12,610,768,2);
				MoveObjectY(14,768,768,2);
				MoveObjectY(15,768,768,2);			
				MoveObjectY(16,768,768,2);	
				addfade(-35,0);		
				visible_object(-35);
				speciale_action(4,-35);					
			return;end;  
	return;end;		
	return;end;

	if sender==1 then
		if obj_id==11 then 
		    flags.skip=true;
			MoveObjectY(1,-200,-385,2);
			speciale_action(2,1100);
			speciale_action(2,11);
			MoveObjectY(12,610,768,2);
			MoveObjectY(14,768,768,2);
			MoveObjectY(15,768,768,2);			
			MoveObjectY(16,768,768,2);		
			addfade(-35,0);		
			visible_object(-35);
			speciale_action(4,-35);	

		return;end;
		
	return;end;
end
