Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
#1002
Auto-translated
You don't even need an extra variable for the region; you can simply call the `SetRegionBlocked` function with the necessary arguments within the function that the trigger references.
 

К А
Стикеры GBF в Telegram
User Avatar
#1003
Auto-translated
I have a question: is it possible to influence the attitude of a specific type of monster present on the map in any way? For example, let's say that at the moment this script is executed, there are 50 creatures of type 1 (peasants) on the map. And using the script, I set their attitude to "always join." It would be very important and convenient if this were possible...

Whatever
In reply to Heroist
User Avatar
#1004
Auto-translated
for i, mob in GetObjectNamesByType("CREATURE_PEASANT") do
SetMonsterCourageAndMood(mob, PLAYER_1, MONSTER_COURAGE_ALWAYS_JOIN, MONSTER_MOOD_FRIENDLY)
end
However, this will not affect creatures that appeared on the map during gameplay.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1005
Auto-translated
Can the name of the monster in quotes be replaced with its ID? If so, should the quotes be removed?

Whatever
In reply to Heroist
User Avatar
#1006
Auto-translated
No. It requires a string containing the name.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1007
Auto-translated
Thank you.

Whatever
#1008
Auto-translated
Is it possible to set it up so that player_6 can survive without a town for more than 7 days? I don't want to exceed the town limit on the map.
In reply to advencher
User Avatar
#1009
Auto-translated
advencher
Is it possible to make it so that player_6 can survive without a town for more than 7 days? I don't want to exceed the town limit on the map.
Open the map properties tree -> objectives -> primary -> player_specific.
Select the tab under number five, and set die_in_week_without_towns to false.
Кампании для 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
#1010
Auto-translated
If a hero who was in reserve comes out of reserve, levels up to level 30, then dies, and then revives again, will he lose his level and artifacts?

Whatever
In reply to Heroist
User Avatar
#1011
Auto-translated
The level will remain, but the artifacts will be lost.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1012
Auto-translated
Oh, that’s interesting, thanks. I’ll need to rewrite the scripts…

Whatever
User Avatar
#1014
Auto-translated
How can I make the computer target a player's hero? P.S. The manual says that the attractor only works on stationary objects.
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
#1015
Auto-translated
It says there that it "correctly" works on stationary targets, and it will also work on moving targets.

Added after 41 minutes
Another option: each turn, force the AI to move towards the player using MoveHero.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#1016
Auto-translated
RedHeavenHero

[/U]Here's another option. Each turn, force the AI to move towards the player using MoveHero.
Then you'll have to determine the player's coordinates. How can this be done?
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
#1017
Auto-translated
local x, y = GetObjectPosition ('hero1name')

then

MoveHero ('hero2name', x, y)

hero1name --- the name of the hero to attack (determines its coordinates)
hero2name --- the name of the hero that will move to the specified coordinates each turn.

Whatever

Statistics

Welcome our newest member: artem