Added after 2 hours 12 minutes
Is there a script where, when you kill a peasant, you get his house?
New here? I'm Roha — want a quick tour?
Is there a script that gives you the peasant's house when you kill him?
IsObjectEnabled
Is there a script that, when you kill a peasant, gives you their house?
function maxF()
if IsObjectExists('max')
then
else
SetObjectOwner('Bar',PLAYER_1);
Trigger(OBJECT_TOUCH_TRIGGER,'max',nil)
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER,'max','maxF')
Did I write it correctly?
Thank you very much, I'm trying it now.
Added 5 minutes laterDid I write it correctly?function maxF()
if IsObjectExists('max')
then
else
SetObjectOwner('Bar',PLAYER_1);
Trigger(OBJECT_TOUCH_TRIGGER,'max',nil)
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER,'max','maxF')
Is the battle trigger OBJECT_CAPTURE_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")