Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Trigger(triggerType, ..., functionName) - он?
triggerType = NEW_DAY_TRIGGER - так?
Герман стоял неподвижно. Герман сошёл с ума. "Старуха!!!" - закричал он в ужасе. Он сидит в Обуховской больнице, в семнадцатом нумере, не отвечает ни на какие вопросы и бормочет необыкновенно скоро: "Тройка, семёрка, туз. Тройка, семёрка, дама".
User Avatar
Auto-translated
yes, it is.
Trigger (NEW_DAY_TRIGGER , 'day1')
day = 0

function day1 ()
day = day + 1
if day == 7 then
AddObjectCreatures ('object_name' , ID, count)
AddObjectCreatures ('object_name' , ID, count)
day = 0
end
end

The code is not error-proof. It might be worth experimenting with the numbers in day == 7, but I'm too lazy to check.

Or, an alternative option: It is most likely a one-time event, as I am not sure how the absolute day works.
Trigger (NEW_DAY_TRIGGER , 'day1')

function day1 ()
if GetDate(ABSOLUTE_DAY) / 8 == 1 then
AddObjectCreatures ('object_name' , ID, count)
AddObjectCreatures ('object_name' , ID, count)
end
end

Whatever
User Avatar
Auto-translated
Thank you!
Both are working!
Герман стоял неподвижно. Герман сошёл с ума. "Старуха!!!" - закричал он в ужасе. Он сидит в Обуховской больнице, в семнадцатом нумере, не отвечает ни на какие вопросы и бормочет необыкновенно скоро: "Тройка, семёрка, туз. Тройка, семёрка, дама".
User Avatar
Auto-translated
Well, regarding the second point: we need to check if it works in the second week. And we need to check it very thoroughly: I'm almost certain it doesn't, because I don't remember how it's supposed to work.
As for the first point, the only thing that might not match is the date: that is, the troops might appear not on the 7th, but on another day of the week.

In any case, you're welcome...

Whatever
User Avatar
Auto-translated
if GetDate(DAY_OF_WEEK) == 1 then...
or wouldn't it be simpler like this?
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
Probably, this is simpler and more correct. I have very old manuals, and there doesn't even seem to be such a feature in them.

Whatever
User Avatar
Auto-translated
I'm just using this feature in a new map. It works as intended, and there's no need to overcomplicate things. Although, all your ideas are also good.
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
Well, as it turned out, I made a mistake in defining the getDate function. As for working with variables, I found it extremely easy, although they might take up a lot of space and probably overload the script.

Whatever
User Avatar
Auto-translated
I've encountered this issue several times. In the script, I define a specific creature, for example, an Angel, and assign it an animation. When the command is executed, the angel freezes somewhere in the middle of the animation, and that's it. And with some creatures, there's no movement at all. Is the problem related to custom maps or mods? If so, which ones? Or is it something else?
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
Well, obviously, in the editor, you should check the animation set of the object (it should be in the shared section in the list, probably as the second entry). There you'll find all the current animations of the creature. Most likely, you have the Adventure variant of it placed on your map (in the dropdown list on the right, you'll see the name of the creature placed on the map). In any case, check if the creature has the animations that you are forcing it to perform with the script. If not, add them manually.

And also - the animation should be with "oneshot", not "oneshot still" at the end.

Whatever
User Avatar
Auto-translated
I was working with a oneshot still. The animation works fine for the Seraphim, but for the Archangels, the same animation doesn't work.
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
this animation is for death, basically. So that after the action is completed (the animation, by default - death), the monster freezes in place. A similar one is used automatically in cutscenes (only without your intervention).

Whatever
In reply to Heroist
User Avatar
Auto-translated
You need to change the LOD animation in the monster's properties to the one corresponding to the arena.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
That’s exactly what I needed for the death animation! Thank you, it works.
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
Exactly, that's what I meant about LOD. I wrote "adventure." My mistake, I apologize; knowledgeable people quickly chimed in.

Whatever

Statistics

Welcome our newest member: Emil