Of course. You can do anything with programming. But eating corpses could be done even with the level editor alone, you just put an invisible button next to a corpse, which removes the corpse or makes it invisible, with an entity like func_changetarget or env_render, and plays an eating sound with ambient_generic, and gives you health with game_player_equip or a trigger_hurt with a negative damage value. But this would only work for corpses that already exist when the map loads.