function CallbackForSheetButton(nCount)
  flags.is_hidden_loc = false;
  jump("zarosli","tropa_obryva",16,0);
end;

function LevelComplete()
   if not flags.blockrender then
	   Block_Show_Cur(true);
	   StartTimer(8881,1);
	   hidden_finished=true 
   end;
return; end;

function SelectRandom()
  idObject=GetRandomObject();
  c=GetActivCount();
  if idObject==-1 then
      if c~=0 then SelectRandom() return;
      else
      return;end;
  end;  
    if idObject==obj.lodio.id then selectrandomobjectus(1.5,obj.idlone.id); return;end;
  selectrandomobjectus(1.5,idObject);
return;end;

function ActionsJump ()
    
end;

function gameinput (sender,obj_id,attachedID)
  if sender == 1 then    
    if obj_id > 0 and obj_id < 1000000104 then --кликаем на активный объект
    playeffect("collaps")
      dropped_obj = dropped_obj + 1;
      CollapseObj(obj_id);
      if obj_id==obj.idlone.id then
        RemoveActivObject(obj.lodio.id)
        obj.lodio.is_removed=true
      end
  
    return; end
  return ;end;
 
  if sender == 12 then
        if obj.dzynka.is_collapsed and obj.bantec.is_collapsed and obj.efes.is_collapsed and
        obj.takzv.is_collapsed and obj.kepon.is_collapsed and obj.karabu.is_collapsed and
        obj.kovap.is_collapsed and obj.lapen.is_collapsed and obj.pletec.is_collapsed and
        obj.kraka.is_collapsed and obj.skeleq.is_collapsed and obj.saveta.is_collapsed and    
        obj.termec.is_collapsed and obj.palica.is_collapsed and obj.idlone.is_collapsed
        then
           Block_Show_Cur(true);
            if not hidden_finished then
                StartTimer(8881,1);
            end;
            hidden_finished=true  
        end;
  return; end;
  
  if sender==36 then
    if obj_id == 8881 then
        playeffect("hidenend")
      Block_Show_Cur(false);
      StoreObj(obj.lodio.id,nil,"488",335,360,"idol1",320,223)
    return; end;
  return; end;
  if sender == 50 then
    WaitRender();
  return; end;
  if sender == 100 then 
  BlockCursor(false)
  if hidden_finished then
    flags.is_hidden_finish=true
    flags.hidden_zarosli = true;    
    flags.is_hidden_loc = false;
    neighbors.zarosli.lock=true;        
    SetDrawSheet("re",false);      
    jump("zarosli","tropa_obryva",16,0);
    StopEmiter("zarosli_hidd");
    dropped_obj = 0;
  return; end;
  return; end;
end
function SheetSwitched(nCount)
end;