local He = 1003
local She = 1004
local frame = 0;
takeobjecttohand=false
SemiClosePlushes();
StartTimer(159951,1)
takeobjecttohand=true
function gameinput (sender,obj_id,attachedID)

------------------------------------------------------------------------------------------------------------------
	
	 if sender==33 then
		 if plushes_were_closed then			
			clear_satelite_leaf("cockpit");
		 else
			DrawSkipButton();
		end;
	end;
	
	if sender==30 then		
	SetCurrentLeaf("cockpit",7,0);		
	takeobjecttohand=false
	CreatePlashechka(688,"65","goodgirl")
	ShowMenu(true)
	SwitchToSheet("re")
	OpenPlushes()
	return;end
-------------------------------------------------------------------------------------------------------------------

	
-------------------------------------------------------------------------------------------------------------------

	if sender==36 then
		if obj_id==159951 then
			-- C_Callaps(1008,10)
			ColorCallaps(1008,100,10);
			playeffect("066")
			StartTimer(159952,2)
		return; end;
		if obj_id==159952 then
			speciale_action(2,1006,true)
		return; end;
		if obj_id==777 then
			if frame==0 then
				speciale_action(2,706, true)
				speciale_action(2,1029, true)
				speciale_action(2,1028, true)
				speciale_action(2,1027, true)
				speciale_action(2,1026, true)
				speciale_action(2,1024, true)
				frame = frame + 1;
				StartTimer(777,2.5)
			return; end;
			if frame==1 then
				speciale_action(2,1025, true)
				speciale_action(2,1024, true)
				frame = frame + 1;
				StartTimer(777,2.5)
			return; end;
			if frame==2 then
				speciale_action(2,1025, true)
				Blocking= true;
				frame = frame + 1;
				StartTimer(778,1.5)
			return; end;	

		return; end;
				if  obj_id==778 then
				CloseComPlash()
				plushes_were_closed=true
			return; end;
	return; end;
	if sender==28 then
	
	if flags.plawes then
	flags.start_gutters=false;
		
		
			flags.mini1= true;
			flags.mini_com= true
			flags.cton= false;
			flags.start_gutters = false;
			
	
	end
		BlockCursor(false);

			if flags.first_up2 then
				flags.first_up2= false;
				if obj_id == top_plush_id then
					-- speciale_action(2,1007,true)
				return; end;
			return; end;
			if frame == 3 then
				if obj_id == She then
					MakeMessage(She,"59");
				return; end;
			return; end;
			if frame == 4 and obj_id == He then
				MakeMessage(He,"51");
			return; end;	
			if frame == 7 and obj_id == He then
				CloseComPlash()
				plushes_were_closed=true
					flags.plawes= true;
			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==15 then
		if obj_id == 1007 then
				speciale_action(2,1008, true)
		return; end;
		if obj_id == 1006 then
				speciale_action(2,1005, true)
				StartTimer(777,2.5)
			
		return; end;
				if obj_id == 1025 then
		
		return; end;
	return; end;

	if sender == 1 then --кликнули левой кнопкой мыши на активный объект
		if obj_id == skip_id then
			BlockCursor(false)			
			flags.plawes= true;
			plushes_were_closed=true
			CloseComPlash()
			
		end;
	return;end;
	
	

end
