And Jack_of_shadows has already written everything you need; you're just too lazy to figure it out. Here's an example:
function MyMobHandler(hero, obj)
if hero == "hero name" then -- So that the script only works for the main hero. If it should work for everyone, remove this
MessageBox("Path/To/Text/file.txt", "MyMobHandlerCallback('"..obj.."')")
end
end
function MyMobHandlerCallback(obj)
Trigger(OBJECT_TOUCH_TRIGGER, obj, nil)
RemoveObject(obj)
-- CreateDwelling("dwell", TOWN_HEAVEN, 3, PLAYER_1 115, 115, GROUND)
-- You can't create an arbitrary building with a script, only a dwelling
end
SetObjectEnabled("MobName", nil)
Trigger(OBJECT_TOUCH_TRIGGER, 'MobName', 'MyMobHandler')
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________