Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#4260
Auto-translated
Should this be written directly in the unit's function?
All scripts are written in the MapScript.lua file, or they can be split into separate files as needed and connected using doFile(). All code written "without a wrapper" is executed when the map starts; everything inside functions is executed only when the function is called.
In reply to Jack_of_shadows
User Avatar
#4261
Auto-translated
Jack_of_shadows
All scripts are written to the MapScript.lua file, or split into separate files as needed and connected using doFile(). All code written "without a wrapper" is executed when the map starts; everything inside functions is executed only when the function is called.

Thank you, I figured it out, it works ;)

Added after 17 hours 22 minutes
How does doFile work?
User Avatar
#4262
doFile(GetMapDataPath()..'some_script.lua');
User Avatar
#4263
Auto-translated
Thank you!
User Avatar
#4264
Auto-translated
Guys, do you have any advice on what to do with this? I tried reinstalling, checked the Manuals, and used Lover, but nothing works.
Attachments 1
1 file attached • Total size: 111.3 KB
User Avatar
#4265
Auto-translated
Have you tried using the lower setting with a brush size of 3?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#4266
Auto-translated
RedHeavenHero
Have you tried using a brush size of 3 for the lower setting?
I haven't tried it. I did it now, as you suggested, and it worked, thank you!
#4267
Auto-translated
Is it risky to create maps with a size of 256x256 and 320x320? Is it risky because these maps cannot be completed?
In reply to Utiferus
User Avatar
#4269
Auto-translated
Thorenlawar
Is it risky to create maps with sizes of 256x256 and 320x320? Is it risky because these maps cannot be completed?

Many 320x320 maps cause the game to crash when launched. I don't know about 256x256, but they work, albeit with some lag. Also, the map editor often crashes when you try to open such maps. :(

Added after 2 hours 18 minutes
What should I do? When I adjust the lighting in GroundAmbientLights, the lighting on the map automatically changes. How can I "turn it off" and make it "turn on" only with a script?
User Avatar
#4270
Auto-translated
There, you can add many light sources; it seems the first one will be present on the map by default, and you can switch between them using scripts.
User Avatar
#4271
Auto-translated
The question is silly. How do I make it so that on day 6, for example, a message is displayed? I missed that part.
User Avatar
#4272
Auto-translated
User01322342, the task is as follows: there is an event (the start of a new day), and there is a script that needs to be executed when this event occurs (a message). In Heroes 5, triggers are responsible for handling events, specifically the NEW_DAY_TRIGGER, which is what you need. By opening the documentation for the word "Trigger," you can find all the possible events that can be intercepted in this way. There are quite a few of them.
User Avatar
#4273
Auto-translated
Guys, I really need your help. I have a problem: I'm a newbie in the map editor, but I decided to try creating my own campaign. While testing the first mission, I noticed that the creatures that join the army don't say the message I wrote for them. What's the problem?
In reply to &T&T&Twreqnd
User Avatar
#4274
Auto-translated
&T&T&Twreqnd
Guys, I really need your help. I have a problem: I'm a newbie in the map editor, but I decided to try creating my own campaign. When testing the first mission, I noticed that the creatures that join the party, for some reason, don't say the message I wrote for them. What's the problem?

Did you write a script for that creature?
In reply to John_Lock
User Avatar
#4275
Auto-translated
I don't understand this, but it's strange that after a battle, the creature speaks a text, but without a battle, it doesn't. Can you help?

Statistics

Welcome our newest member: artem