Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
unexpected, right?))

I'll check this huge feature now and see how it works.

Added 19 minutes later
Yes, it worked. Thank you very much for your patience and understanding!

Whatever
User Avatar
Auto-translated
It turned out that there was another small error in the script, related to DoNotGiveTurnToPlayerAIIfNoTownsAndActiveHeroes(4, true)

Here's the thing. I set the second argument to true, and everything works. But as soon as I need to disable this function and set it to nil, everything breaks. What should the second argument be to disable this command?

Whatever
User Avatar
Auto-translated
I believe there is. I'm not sure if it will work well with MoveHero.

Whatever
User Avatar
Auto-translated
Yeah, that’s what I thought. Yes, everything worked out, thank you.

Whatever
User Avatar
Auto-translated
decided to reread the scripting manual again; I'm glad there aren't that many questions left.

RazeBuilding(objectName); -- does this destroy dwellings? Or not? And what does it turn them into?
SetStandState -- what are "stands" and how do they work? What is this even about?

Whatever
User Avatar
Auto-translated
RazeBuilding destroys a dwelling, leaving nothing behind. I have repeatedly mentioned stands in this thread and in "current issues." It is an object of type AdvMapStandShared.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
That’s what I thought. Thanks.

Added 38 minutes later
Oh, and here’s something else I’d like to know. How do I stop the sound from playing?
And is it necessary in this situation?
SOUND_EFFECT_WALL = "/Sounds/_(Sound)/Spells/FireWall.xdb#xpointer(/Sound)";
---
Play3DSound(SOUND_EFFECT_WALL, GetObjectPosition('Nymus'));

I don’t really understand how to do this. I’ll look for it in other maps, but no one has used StopPlaySound in the campaign maps.

Whatever
User Avatar
Auto-translated
This is problematic. The wall burns around Nimus for a while, then goes out.

Added 2 minutes later
Okay... I'll do it with a fire explosion instead.

Whatever
In reply to Heroist
User Avatar
Auto-translated
I read the manual. Judging by what is written there, you can do the following: ``` sound_id = Play2DSound("sound") -- or 3D ... StopPlaySound(sound_id)
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Ah, yes, that’s right, that’s probably a good way to do it. (I don’t have sound in the game, so I can’t check.) ;)

Whatever
User Avatar
Auto-translated
Could you please tell me why this piece of script isn't working? The creatures are created as expected, but everything that follows their creation is not executed. ``` elseif IsObjectiveVisible("Sec108", 1)==nil then SetObjectiveState("Sec108", 2, 1); SetObjectiveVisible("Sec108", true, 1); SetObjectiveState("Sec109", 2, 1); SetObjectiveVisible("Sec109", true, 1); MessageBox(GetMapDataPath().."pald1.txt"); pald=1; CreateMonster("palasd1", 12, 1, 20, 43, 0, 0, 0, 270); CreateMonster("palasd2", 12, 1, 135, 55, 0, 0, 0, 90); CreateMonster("palasd3", 12, 1, 123, 125, 0, 0, 0, 0); CreateMonster("palasd4", 12, 1, 158, 130, 0, 0, 0, 270); CreateMonster("palasd5", 12, 1, 84, 182, 0, 0, 0, 270); CreateMonster("palasd5", 12, 1, 88, 149, 0, 0, 0, 270); if k==0 then CreateMonster("prots1", 42, 60, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 60, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 60, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 60, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 60, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 40, 86, 149, 0, 1, 1, 90); elseif k==1 then CreateMonster("prots1", 42, 100, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 100, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 100, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 100, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 100, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 70, 86, 149, 0, 1, 1, 90); elseif k==2 then CreateMonster("prots1", 42, 150, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 150, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 150, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 150, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 150, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 100, 86, 149, 0, 1, 1, 90); else CreateMonster("prots1", 42, 200, 18, 43, 0, 1, 1, 90); CreateMonster("prots2", 56, 200, 137, 55, 0, 1, 1, 270); CreateMonster("prots3", 84, 200, 123, 123, 0, 1, 1, 180); CreateMonster("prots4", 105, 200, 156, 130, 0, 1, 1, 90); CreateMonster("prots5", 130, 200, 82, 182, 0, 1, 1, 90); CreateMonster("prots6", 91, 150, 86, 149, 0, 1, 1, 90); end; sleep(4); for i=1,6 do SetObjectEnabled("palasd"..i, nil); SetObjectEnabled("prots"..i, nil); end; sleep(4); for i=1,6 do SetMonsterSelectionType("palasd"..i, 0); SetMonsterSelectionType("prots"..i, 0); end; sleep(4); for i=1,6 do PlayObjectAnimation("palasd"..i, "attack00", IDLE); PlayObjectAnimation("prots"..i, "attack00", IDLE); end; for i=1,6 do SetRegionBlocked("pasd"..i, true, 7); end; Trigger(6, "pasd1", "pasd1F"); Trigger(6, "pasd2", "pasd2F"); Trigger(6, "pasd3", "pasd3F"); Trigger(6, "pasd4", "pasd4F"); Trigger(6, "pasd5", "pasd5F"); Trigger(6, "pasd6", "pasd6F"); ```

Added 52 seconds ago
I think I found the error; you can delete the message
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира

Statistics

Welcome our newest member: Emil