Auto-translated
How can a town be restored from ruins?
I mean, there are destroyed Human and Demon towns. Is there a way to change an object into a town?
I tried SetObjectOwner, but it seems to only work for towns.
There doesn't seem to be a direct function to restore a town from ruins. You can try a workaround:
function RazeOfTown()
MakeTownMovable(nTownname);
--makes the town movable
SetObjectPosition(nTowname, x, y, floor);
--teleports the town to some empty area, hidden from view (e.g., in a Dungeon)
PlayVisualEffect(...);
--some nice effects of the town's destruction
CreateStatic("RazedTown", /Path to model.xdb#xpointer(/Model), x, y, floor);
--creates ruins in place of the town
end;
...
...
function TownRebuilt()
RemoveObject("RazedTown");
--removes the ruins
PlayVisualEffect(...);
--some nice effect of the town's restoration
SetObjectPosition("TownName", x, y, floor);
--returns the town to its place
end;
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________