Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#2771
Auto-translated
And the last question for today (I hope). For "Happy Dragonling," should I replace "attack00" with "happy"?

Added 2 minutes later
function InitBuildings()
for i, building in GetObjectNamesByType"PEASANT_HUT" do
Trigger(5, building, "TransformBuilding")
end
for i, building in GetObjectNamesByType"ARCHERS_HOUSE" do
Trigger(5, building, "TransformBuilding")
end
for i, building in GetObjectNamesByType"BARRACKS" do
Trigger(5, building, "TransformBuilding")
end
for i, building in GetObjectNamesByType"HEAVEN_MILITARY_POST" do
Trigger(5, building, "TransformBuilding")
end
end

function TransformBuilding(_, _, hero, building)
if hero == "Pelt" then
ReplaceDwelling(building, TOWN_NECROMANCY)
end
end

function TransformHavenTown(_, _, hero)
if hero == "Pelt" then
TransformTown("Sian", TOWN_NECROMANCY)
sleep(10)
SetObjectPosition("Pelt", GetObjectPosition("Sian"))
end
end

startThread(InitBuildings)
Trigger(5, "Sian", "TransformHavenTown")
I'm a bit confused, what exactly should I change here?
Правило во взгляде...
User Avatar
#2772
Auto-translated
Yes.

Added 1 minute ago
function TransformBuilding(_, _, hero, building)
if hero == "Pelt" then
ReplaceDwelling(building, TOWN_NECROMANCY)
end
end
Replace this snippet with the one I wrote.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2773
Auto-translated
Thank you so much! I don't know what I would do without you.

Added after 12 hours and 39 minutes
Hello. The building now burns down, but it disappears at the moment of burning... I was thinking of making it like in the Frida campaign, where when she burns something, the object remains, it just burns and becomes inaccessible...
Правило во взгляде...
User Avatar
#2774
Auto-translated
In Freya’s campaign, the dwellings disappear.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2775
Auto-translated
A... it's just that the house disappeared first, and then a fire appeared. It looked fun)

Added after 52 seconds
and how do you ask the question, like in the campaign, when playing as the Orcs in the first mission? Where you really want to destroy something? - if the answer is yes, then there are screams, wails, the house burns, and it doesn't seem to disappear.

Added after 22 minutes
although, okay, it looks cool this way too.
Правило во взгляде...
User Avatar
#2776
Auto-translated
I have a question: how can I make sure that a neutral unit on the map has the number of creatures I specified in the options? Usually, when I check, the number of creatures is reduced by a factor of two, and sometimes even by a factor of ten. Could it be that I need to play on a difficulty level higher than "Warrior" for this to work?
Мои карты:
H5: Графство Грагорье
H3:
User Avatar
#2777
Auto-translated
Everything you set in the options applies to the "Knight" difficulty by default. There's an option in each unit type to remove this variance.

Whatever
User Avatar
#2779
Auto-translated
How can I “decorate” a map with images when selecting it from the menu and when loading it?
Правило во взгляде...
In reply to Rhenish
User Avatar
#2780
Auto-translated
There's an entire thread with detailed descriptions about this, created by the highly respected Vulpes93. Thread
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2781
Auto-translated
How can I disable the "highlighting" of creatures? I mean, the circles under neutral creatures. And how can I turn a neutral creature into a creature belonging to player 1?
Правило во взгляде...
User Avatar
#2782
Auto-translated
It might be possible to remove the circles. There was a function for that somewhere, but I don't remember exactly. I think RedHeavenHero or someone else might remember and explain it.
As for the second question, I don't think it's possible. Besides, I can't really imagine how it would even look. A monster standing on the map without a player is, by default, neutral. That's the main difference. However, you could create a neutral hero who won't move on his own but will defend himself and have creatures in his army.

Whatever
In reply to Rhenish
User Avatar
#2783
Auto-translated
Rhenish
How can I remove the "highlight" around creatures? I mean, the circles under neutral creatures.
You can only remove the circles from disabled monsters. That is, the hero will not interact with them.
SetObjectEnabled("name", nil)
sleep()
SetMonsterSelectionType("name", 0)
And how can I turn a neutral creature into a creature belonging to player 1?
It is possible to simulate this using a lot of scripts and caravans. I've already done this, and the result was quite decent. If anyone is interested, I will post the script. But it will need to be adapted to the map.

Added 7 minutes later
I will post screenshots now.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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

Attachments 3
3 files attached • Total size: 1.2 MB
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2785
Auto-translated
Rhenish, am I understanding correctly that this is what we need?

Added 1 minute ago
Or, conversely, as Heroist suggested, do we need a neutral hero?

Added 10 minutes ago
There are still some minor, purely visual, issues with the scripts. For example, the caravan is not always removed after use. Also, the question of what should happen when a hero and a monster belonging to the same player interact has not been resolved.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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