Skip to content

Current questions and answers regarding the map editor.

User Avatar
#1772
Auto-translated
You can also use a touch trigger:
function touch_peasant(hero)
	repeat
		sleep(1);
		if IsObjectExists("peasant") == nil then
			SetObjectOwner("hizhina", 1);
			break;
		end;
	until IsHeroAlive(hero) == nil
end;

Trigger(OBJECT_TOUCH_TRIGGER, "peasant", "touch_peasant")

In my opinion, using COMBAT_RESULTS_TRIGGER would be too complicated.