Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#2529
Auto-translated
How can I prevent any buildings from being constructed in castles? Where and how can I learn scripting? A map for the Dwarves, titled "Crushing Blow," is in development. The map is 25% complete.
User Avatar
#2530
Auto-translated
Castles - place a castle on the map, press the spacebar, and in the list, select "buildings" - this will display the structures, along with the buttons "build initially," "not built," and "cannot be built" (English).
Scripts - refer to the manuals (editor documentation in the game folder).

Whatever
User Avatar
#2531
Auto-translated
For example, if I want a hero to receive the exact amount of experience points needed to reach the next level, do I simply need to write LevelUpHero(heroName) in the script field (e.g., LevelUpHero(Rutger)), or are there other script lines I need to include?
______________
A map featuring the Dwarves, titled "Crushing Blow," is in development. The map is 25% complete.
User Avatar
#2532
Auto-translated
That's enough; you just need to put the hero's name in quotation marks.
Кампании для 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
#2533
Auto-translated
Should I write the name without parentheses? And is it necessary to add extra words, for example, "end" at the end?
In reply to mapeditor5
User Avatar
#2534
Auto-translated
LevelUpHero('Brem')
-- or --
LevelUpHero'Brem'
Script names often differ from the actual names!
Instead of apostrophes, you can use quotes or double square brackets.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2535
Auto-translated
Besides LevelUpHero('HeroName'), are there any other script commands that need to be written, for example, 'end' at the end? For RedHeavenHero. What does "Script names often differ from the actual names" mean?
In reply to mapeditor5
User Avatar
#2536
Auto-translated
No words are needed. Script names are not the same as the names displayed for the hero. To view this name, select the hero, press the spacebar, and look at the Script name in the Settings tab.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2537
Auto-translated
1) No, just this line. 2) They differ from the real ones – meaning the hero names for the script are different from the names we see in the game. Rutger = Brem Vittorio = Christian Railag = Raelag And so on. Added after 38 seconds
Oh, they already explained...

Whatever
User Avatar
#2538
Auto-translated
And when are additional script keywords needed (for example, at the end – “end”)?
In reply to mapeditor5
User Avatar
#2539
Auto-translated
To close if-then blocks, do loops, and functions.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2540
Auto-translated
What are the if-then, do, and function blocks?
User Avatar
#2541
Auto-translated
This is already a scripting language. Refer to the manual.

Whatever
In reply to Heroist
User Avatar
#2542
Auto-translated
There’s a lot of things, but this is definitely missing. It’s not even on the website of the Lua creators :eek:. The only thing written there is that “Control structures have their usual meaning and familiar syntax,” meaning that if you’re a programmer, you should know these basics.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2543
Auto-translated
I tried writing in Visual Basic at first (it was the only thing I knew), and I was in for a rude awakening. ;)

Whatever

Statistics

Welcome our newest member: wayal