Skip to content

Current questions and answers regarding the map editor.

User Avatar
#4011
Auto-translated
function AddArchangelsSpecialization()
if GetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL) ~= -1 then
local add = 1
if grail_built == 1 then
add = add + 3
end
SetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL, GetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL) + add)
end
end

function NewDay();
if GetDate(DAY_OF_WEEK) == 1 then
AddArchangelsSpecialization()
end
end

Trigger(NEW_DAY_TRIGGER, 'NewDay')

grail_built = 0

function WaitForBuildGrail()
while GetTownBuildingLevel('AdvMapTown-12119', ID_14) == 0 do
sleep(10)
end
grail_built = 1
end

startThread(WaitForBuildGrail)
The town's name is not assigned as the default. Give it a script name and substitute it instead of AdvMapTown-12119. ID_14 is also incorrect; just use 14.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4