function gameinput (sender,obj_id,attachedID)
-----------------------------------------------------------------------------------------------------------------------
	if sender==100 then
		delete_tree_leaf("Root","comics");
		setnextlavel(21);--21
		loadlavel();	
	return;end;
	
	if sender==16 then

		if obj_id==25 then
			unvisible_object(-30);
--			del_object_from_game(-30);
		--	playeffect("Bike1");
			MoveObjectX(25,-300,366,3);		
			
		return;end;		
		
		if obj_id==27 then
			unvisible_object(-31);
		return;end;
	
		if obj_id==-30 then
			if frame==-2 then
				speciale_action(2,20);
				speciale_action(2,21);
				speciale_action(2,23);
				speciale_action(2,24);	
				speciale_action(2,70);					
				speciale_action(2,25,true);
				
				speciale_action(2,26);
			return;end;	
		return;end;
		if obj_id==-31 then
				speciale_action(2,26,true);
				speciale_action(2,27);
				speciale_action(4,1)
				speciale_action(4,12)
				speciale_action(4,11)
				
		return;end;

		if obj_id==-32 then
			speciale_action(2,27,true);
			speciale_action(2,28);
		return;end;
		
		if obj_id==28 then
			--BlockCursor(false);
			block=false;
		return;end;
		
	return;end;

	if sender==15 then
		if obj_id==-31 then
			ScaleTileObject(27,1,0.8,2,200,500);
			
			frame1=0;
			-- ScaleObject(2,0.9,1);
			-- setcolor(1100,1,1,1,1,1);
			-- set_text(1100,"250");
			-- setcolor(3,0.6,0.6,0.6,1);
			-- setcolor(2,1,1,1,1);
			-- frame=frame+1;	
		return;end;

		if obj_id==-32 then
		--	BlockCursor(false);
			block=false;
			speciale_action(4,14);
			speciale_action(4,15);
			speciale_action(4,1100);
			speciale_action(2,14);
			ScaleObject(2,0.9,1);
			setcolor(1100,1,1,1,1,1);
			set_text(1100,"250");
			setcolor(3,0.6,0.6,0.6,1);
			setcolor(2,1,1,1,1);	
		return;end;
		
		if obj_id==26 then
			unvisible_object(-31);
		return;end;
		
		if obj_id==27 then
			unvisible_object(-32);
		return;end;
		
	return;end;
	
	if sender==29 then
		if obj_id==27 then
			if frame1==0 then
				 MoveObjectX(27,-73,0,2);

			return;end;
			
			if frame1==1 then
				speciale_action(2,28,true);
				speciale_action(4,28)
				playeffect("MobTable")
			return;end;
		return;end;
		
		if obj_id==26 then
			frame=frame+1;
			addfade(-31,0);		
			visible_object(-31);
			speciale_action(4,-31);					
		return;end;
	return;end;
	
	if sender==28 then
				if flags.skip then
					WaitRender();	

--				   DeleteResource("m0000");
--				   DeleteResource("m0001");
--				   DeleteResource("m0002");
--				   DeleteResource("m0003");
--				   DeleteResource("m0004");
--				   DeleteResource("m0005");
--				   DeleteResource("m0006");
--				   DeleteResource("m0007");
--				   DeleteResource("m0008");
--				   DeleteResource("m0009");
--				   DeleteResource("m0010");
--				   DeleteResource("m0012");
--				   DeleteResource("m0017");
--				   DeleteResource("m0015");				   
				return;end;
				
				if obj_id==25 then
					speciale_action(2,25)
					speciale_action(2,30)
					speciale_action(2,31)
					ScaleObject(26,1,1.2);
					frame=frame+1;
				return;end;
				
				if obj_id==1 then
					if frame==-2 then

						speciale_action(2,11);
						MoveObjectX(25,-300,366,3);	
						playeffect("Bike1");
						MoveObjectX(30,-286,380,3);	
						MoveObjectX(31,-110,556,3);	
					--	BlockCursor(false);	
					return;end;	
					if frame==8 then	
						 -- BlockCursor(false);	
							block=false;						  
						WaitRender();
					return;end;			
				return;end;
				
				if obj_id==3 then
					if frame==1 then
						--BlockCursor(false);
						block=false;
					return;end;
					if frame==11 then
						--BlockCursor(false);	
						block=false;
					return;end;
				return;end;

				if obj_id==2 then
					if frame==0 then
				--		del_object_from_game(-30);
						--BlockCursor(false);
						block=false;
						--speciale_action(2,14);
						ScaleObject(2,0.8,0.9);
						setcolor(1100,1,1,1,1,1);
						set_text(1100,"250");
						setcolor(3,0.6,0.6,0.6,1);
						setcolor(2,1,1,1,1); 
						framefinish=true;		
					return;end;
				return;end;	
				
				if obj_id==27 then
					if frame1==0 then
						ScaleTileObject(27,0.8,1,2,0,500);
						
						frame1=1;						
					return;end;
				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
				  flags.skip=true;
					addfade(-33,0);		
					visible_object(-33);
					speciale_action(4,-33);		
					  speciale_action(2,1100);
					  MoveObjectY(1,-200,-385,2);
					  MoveObjectY(12,610,768,2);
					unvisible_object(2);
					unvisible_object(10);
					unvisible_object(11);
					unvisible_object(14);
					unvisible_object(15);
					unvisible_object(3);
					unvisible_object(5);
	--			  addfade(-30,0);
	--			  speciale_action(4,-30);
				 -- visible_object(-30);
				  darkness=true;			  
				  if frame==0  or frame==11 then
					unvisible_object(2);			  
				  return;end;
				  if frame>=1 and frame<11 then
					unvisible_object(2);	
					unvisible_object(3);
					unvisible_object(5);				
				  return;end;			
			return;end;
			
	return;end;
	
	if sender == 6 then		
	if not block then
		frame=frame+1;	
			
		if frame==-2 then
			--BlockCursor(true);
			block=true;
			DeleteResource("cm0026");
			DeleteResource("cm0025");
			DeleteResource("cm0030");
			DeleteResource("cm0031");
			addfade(-30,0);
			visible_object(-30);		
			speciale_action(4,-30);       
		return;end;

		if frame==0 then
		--	BlockCursor(true);
		block=true;
			addfade(-31,0);		
			visible_object(-31);
			speciale_action(4,-31);	
		return;end;
	
	
			if frame==1 then
			--	BlockCursor(true);
			block=true;
				addfade(-32,0);		
				visible_object(-32);
				speciale_action(4,-32);					
			return;end;



			if frame==2 then 
				framefinish=false;
				DeleteResource("cm00271");
				DeleteResource("cm00272");
				DeleteResource("cm00273");
				DeleteResource("cm00274");
				DeleteResource("cm0028");
				DeleteResource("cm0029");
			    speciale_action(2,3,true,2);
	--			MoveObjectX(2,366,76,2);
				ScaleObject(2,0.9,0.8);
 				ScaleObject(3,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(3,1,1,1,1); 
				set_text(1100,"251");
				speciale_action(2,5,true);
				speciale_action(2,14);
				speciale_action(2,15);			
			return; end;
			
			if frame==3 then 
				set_text(1100,"252");
				ScaleObject(2,0.8,0.9);
				ScaleObject(3,1,0.9);
				setcolor(3,0.6,0.6,0.6,1);
			    setcolor(2,1,1,1,1); 
				speciale_action(2,14);
				speciale_action(2,15);
			return; end;
			
			if frame==4 then 
				set_text(1100,"253");
				ScaleObject(2,0.9,0.8);
				ScaleObject(3,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(3,1,1,1,1); 			
				speciale_action(2,14);
				speciale_action(2,15);

			return; end;
			
			if frame==5 then 
				set_text(1100,"254");
				ScaleObject(2,0.8,0.9);
				ScaleObject(3,1,0.9);
				setcolor(3,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 			
				speciale_action(2,14);
				speciale_action(2,15);

			return; end;
			
			if frame==6 then 
				set_text(1100,"255");  	
				ScaleObject(2,0.9,0.8);
				ScaleObject(3,0.9,1);
				setcolor(2,0.6,0.6,0.6,1);
				setcolor(3,1,1,1,1); 
				speciale_action(2,14);
				speciale_action(2,15);

			return;end;
			
			if frame==7 then
				ScaleObject(2,0.8,0.9);
				ScaleObject(3,1,0.9);
				set_text(1100,"256");
				setcolor(3,0.6,0.6,0.6,1);
				setcolor(2,1,1,1,1); 	
				speciale_action(2,14);
				speciale_action(2,15);
			return;end;

			
				
			if frame==8 then 
			--	BlockCursor(true);
				block=true;
				speciale_action(2,1100);
				MoveObjectY(1,-200,-385,2);
				unvisible_object(2);
				unvisible_object(10);
				unvisible_object(11);
				unvisible_object(14);
				unvisible_object(15);
				unvisible_object(3);
				unvisible_object(5);
				-- MoveObjectX(2,76,-500,2);
				-- MoveObjectY(10,700,768,1);
				-- MoveObjectY(11,20,-200,1);
				MoveObjectY(12,610,768,2);
				addfade(-34,0);		
				visible_object(-34);
				speciale_action(4,-34);	
				-- MoveObjectY(14,768,768,1);
				-- MoveObjectY(15,768,768,1);
				-- MoveObjectX(3,600,1024,1);
				-- speciale_action(2,5,true);
			return;end;  
	return;end;		
	return;end;
end
