Skip to content
User Avatar
#1765
Auto-translated
Could you please tell me why this piece of script isn't working? The creatures are created as expected, but everything that follows their creation is not executed. ``` elseif IsObjectiveVisible("Sec108", 1)==nil then SetObjectiveState("Sec108", 2, 1); SetObjectiveVisible("Sec108", true, 1); SetObjectiveState("Sec109", 2, 1); SetObjectiveVisible("Sec109", true, 1); MessageBox(GetMapDataPath().."pald1.txt"); pald=1; CreateMonster("palasd1", 12, 1, 20, 43, 0, 0, 0, 270); CreateMonster("palasd2", 12, 1, 135, 55, 0, 0, 0, 90); CreateMonster("palasd3", 12, 1, 123, 125, 0, 0, 0, 0); CreateMonster("palasd4", 12, 1, 158, 130, 0, 0, 0, 270); CreateMonster("palasd5", 12, 1, 84, 182, 0, 0, 0, 270); CreateMonster("palasd5", 12, 1, 88, 149, 0, 0, 0, 270); if k==0 then CreateMonster("prots1", 42, 60, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 60, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 60, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 60, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 60, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 40, 86, 149, 0, 1, 1, 90); elseif k==1 then CreateMonster("prots1", 42, 100, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 100, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 100, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 100, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 100, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 70, 86, 149, 0, 1, 1, 90); elseif k==2 then CreateMonster("prots1", 42, 150, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 150, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 150, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 150, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 150, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 100, 86, 149, 0, 1, 1, 90); else CreateMonster("prots1", 42, 200, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 200, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 200, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 200, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 200, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 150, 86, 149, 0, 1, 1, 90); end; sleep(4); for i=1,6 do SetObjectEnabled("palasd"..i, nil); SetObjectEnabled("prots"..i, nil); end; sleep(4); for i=1,6 do SetMonsterSelectionType("palasd"..i, 0); SetMonsterSelectionType("prots"..i, 0); end; sleep(4); for i=1,6 do PlayObjectAnimation("palasd"..i, "attack00", IDLE); PlayObjectAnimation("prots"..i, "attack00", IDLE); end; for i=1,6 do SetRegionBlocked("pasd"..i, true, 7); end; Trigger(6, "pasd1", "pasd1F"); Trigger(6, "pasd2", "pasd2F"); Trigger(6, "pasd3", "pasd3F"); Trigger(6, "pasd4", "pasd4F"); Trigger(6, "pasd5", "pasd5F"); Trigger(6, "pasd6", "pasd6F"); ```

Added 52 seconds ago
I think I found the error; you can delete the message
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира