Posts from Current questions and answers regarding the map editor.
Auto-translated
as soon as I insert a text message into the map archive using Notepad, it immediately gets moved to drive C?
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
Well, yeah.
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
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"
"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.
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.
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?
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.