Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to AlekseyS
User Avatar
7 years ago
Auto-translated
In the SummonCreature combat script, does the number of creatures have to be an integer?
In reply to LetoX
User Avatar
7 years ago
Auto-translated
LetoX
In the SummonCreature combat script, does the number of creatures have to be an integer?
Not necessarily. You can specify a non-integer number – the function will automatically discard the fractional part.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AlekseyS
User Avatar
7 years ago
Auto-translated
AlekseyS
Is there a way to make machines (tent and ballista) restore their health during their turn in battle?
And my second question: how can I force an enemy hero to stay in defense during their turn?
Thank you in advance.
1) Perhaps summoning an Elder Gremlin to repair them.
2) The function controlling the AI hero's turn should return 1. For example:
function DefenderHeroMove()
return 1
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AlekseyS
User Avatar
7 years ago
Auto-translated
AlekseyS
Is there absolutely no alternative? I just need the enemy hero to cast either a general speed boost or a general speed reduction on their turn.
You could write your own simple generator, for example, one that works using this method.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AlekseyS
User Avatar
7 years ago
Auto-translated
AlekseyS
Is Frida's (Vessel of Elrath) specialization a combat script? If so, what does it look like?
No, it's not a script. The developers did not implement general game mechanics through scripts.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
7 years ago
Auto-translated
In the Warlock campaign in the Hammers of Fate expansion, in one of the missions, the main hero travels with a dragon that cannot be lost (losing it means losing the mission). So, he ends up with a bunch of dragons and doesn't lose them, but that's not what I'm talking about. I added this function to track the dragon, but my situation is slightly different - at one point in the story, the main hero must lose this unit. So, the question is: is it possible to make the loss of this unit a condition for losing the mission, but at one specific moment, when this unit dies as part of the story, the game doesn't end?
Автор карт:
Долина расхитителей
Выбор мира
User Avatar
7 years ago
Auto-translated
dragon_death_must_finish_game = 1; ... if (dragon_death_must_finish_game == 1) then -- check for dragon loss end ... if (the moment when the dragon can be lost has arrived) then dragon_death_must_finish_game = 0; end
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
7 years ago
Auto-translated
Help me!
As soon as I create a script (a simple one, for an attack animation), the map editor crashes.

Statistics

Welcome our newest member: recijeb