SetObjectEnabled('hut', false);
function sobjend(hero);
if hero== --script name of your hero-- then
SetObjectiveState('sobj', OBJECTIVE_COMPLETED);
end;
Trigger(OBJECT_TOUCH_TRIGGER, 'hut', nil);
end;
Trigger(OBJECT_TOUCH_TRIGGER, 'hut', 'sobjend', nil);
Added 8 minutes later
And to complete the quest after defeating a hero, choose 'DEFEAT_HERO' in the type.