Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#4692
Auto-translated
Godric's Hollow, open the map with an archiver, and you'll see those very folders inside: "Maps/SingleMissions/...". And then, depending on where you place the file, that's the path you should write in the script.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
#4693
Auto-translated
Regarding the MessageBox function, I've mostly figured it out, but I still have one question: why, when I save a text file in the Maps folder, it has the correct path, but as soon as I insert it into the map archive, the text message in Notepad immediately moves to drive C? Although, if the file is outside the archive, everything is normal, and I've set the Unicode encoding in Notepad. However, in the properties, it says that the archive itself is in the Maps folder, meaning everything should be normal. I've been struggling with this for three evenings now. :smile45:
User Avatar
#4694
Auto-translated
as soon as I insert a text message into the map archive using Notepad, it immediately gets moved to drive C?
When you edit a file within an archive, the archiver unpacks it to a temporary folder on drive C:, and then, upon closing the file, it repacks it. This is standard behavior.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
#4695
Auto-translated
Help: I wrote a script: ``` function SetBuildFunc() SetObjectEnabled(obelisk1, nil); MessageBox("/Maps/SingleMissions/Revenge of the/sob3.txt") end Trigger(OBJECT_TOUCH_TRIGGER, "obelisk1", "SetBuildFunc"); ``` The idea is that when approaching the obelisk, only a message should appear, and the map where the tear is located should not open. Help, I don't know what's wrong. And yes, I know this was in the FAQ, but it wasn't very clear to me:smile50:.
User Avatar
#4696
Auto-translated
you turned off the obelisk completely.
User Avatar
#4698
Auto-translated
Help, I wrote a script, and it seems to be correct:
SetRegionBlocked("Block1", true, 2);
function Blockers()
PlayObjectAnimation("BlockCap", "happy", ONESHOT);
sleep(10);
PlayObjectAnimation("Blockus1", "attack00", ONESHOT);
sleep(5);
RazeBuilding("Blocker1");
PlayObjectAnimation("Blockus2", "attack00", ONESHOT);
sleep(5);
RazeBuilding("Blocker2");
sleep(5);
RemoveObject("BlockCap");
RemoveObject("Blockus1");
RemoveObject("Blockus2");
sleep(3);
SetObjectPosition("Maeve", 30, 34, -1);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Blocking", nil);
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Blocking", "Blockers");
function EndRain()
SetAmbientLight(1, "Lights\_(AmbientLight)\AdvMap\C1M1xdb#xpointer(AmbientLight)", true, 10);
end
Trigger(NEW_DAY_TRIGGER, 2);
But the console says I have an error:
(Script) ERROR: expected;
last token read `2' at line 1 in string "parse"
I don't understand what the error is, but it seems to be correct :mad:
It's like it was expecting a semicolon; the last character read was in that line.

Added 2 minutes ago
Godric's Hollow
Well, yeah.
I either needed to use a script to open the map, turn off the obelisk afterward, or not turn it off at all
User Avatar
#4699
Auto-translated
A semicolon is also needed after "end".
Кампании для 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
#4700
Auto-translated
Trigger(NEW_DAY_TRIGGER, 2);
But the console says I have an error.
(Script) ERROR: expected;
last token read `2' at line 1 in string "parse"
In a free translation, the last line means:
"The last thing I managed to read before the crash was the number 2."
And the reason is slightly higher, because the new day trigger expects a string with the function name as the second parameter, but you have a number 2 there.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
#4701
Auto-translated
A semicolon is not required, especially after “end”.
In reply to Jack_of_shadows
User Avatar
#4702
Auto-translated
Jack_of_shadows
In a free translation, the last line means:
"the last thing I managed to read before the crash was the number 2."
And the reason is slightly above, that the trigger for the new day expects the second parameter to be a string with the function name, and you have a number 2 there.
Thank you, although I figured it out myself. I watched the Remix video, and instead of 1 0, where GrounLevel should be, there is

Added 8 hours 58 minutes ago
Help, I've rewritten the script almost 10 times.
function EndRain()
if GetDate(3) ==2 then
print("OK");
SetAmbientLight(GROUND, 'Default');
print("OK2");
end
end

Trigger(NEW_DAY_TRIGGER, "EndRain");
everything works fine, but the command
SetAmbientLight(GROUND, 'Default');
the game doesn't want to execute, but the command print("OK2")
works perfectly.
I tried to use the FAQ, but it didn't help.
can you at least provide an example script?
In reply to DarkLordax
#4703
Auto-translated
I encountered a strange problem, and it really scared me: the map simply doesn't open in the game, i.e., it doesn't load. It runs for about 5 seconds and then kicks me back to the scenario list. How can I fix this?
In reply to AstralLein
#4705
Auto-translated
Am I correct in understanding that the obelisk cannot be disabled? Here's the script:
function Sleza()
SetObjectEnabled("obel1", nil)
Trigger(OBJECT_TOUCH_TRIGGER, "obel1", "Sleza")
StartCombat("Godric", nil, 4, 85, 30, 85, 20, 85, 40, 85, 35)
Trigger(OBJECT_TOUCH_TRIGGER, "obel1", nil)
sleep(8)
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireballHitEffect.xdb#xpointer(/Effect)", "obel1", "tag2")
sleep(5)
MessageBox("Maps/SingleMissions/Revenge of the/raki.txt")
end
Trigger(OBJECT_TOUCH_TRIGGER, "obel1", "Sleza")
The obelisk functions normally; when triggered, a section of the map activates, followed by a battle, and then the script continues. Unfortunately, it also cannot be removed from the map. The function is working; a similar function is used in Utopia, but it only triggers a scripted battle.

Added 1 minute ago
If anyone knows how to disable it, please let me know. I suspect it's different from other objects.
User Avatar
#4706
Auto-translated
I'm going to ask a silly question: how do you make it bright in the Dungeon?
У меча предназначения два острия, одно из них ты.

Заинтересованный занимается написанием прохождений
Прохождения]
НЕКРОМАНТ

2,3,4,5
Заинтересованный планирует создать серию мультиплеерных карт "Фантазия безумного картострителей".
Миссия 1 - Фктиф-Зобар готова на 11,5%