Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to Heroist
User Avatar
#956
Auto-translated
commandShot is written with a lowercase letter.

Added 14 minutes later
Dyrman
I don't know, but I'm saying it as I saw it. The difference in delays of 0.5 and 1 is noticeable. If sleep(0.1) doesn't mean a delay at all, then two such sleeps during processing can create a natural delay. The console definitely won't output errors for such values.
Perhaps this is what it is.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#957
Auto-translated
Thank you, it helped. Although, now, even though it works, it displays an error: "wrong type of argument 1 when calling function GetCreatureType", but I probably made a typo somewhere.

Whatever
User Avatar
#958
Auto-translated
I don't know, but I'm just saying what I observed. The difference between delays of 0.5 and 1 is noticeable. If sleep(0.1) doesn't actually mean a delay, then two such sleeps during processing might create a natural delay. The console definitely won't report errors for such values.
I'm not sure if these tricks with sleeps are universal; they might easily depend on the specific computer.
 

К А
Стикеры GBF в Telegram
In reply to Heroist
User Avatar
#959
Auto-translated
Heroist
Thank you, it helped. Although, even now, despite the fact that it works, it displays an error: "wrong type of argument 1 when calling function GetCreatureType", but I probably made a typo somewhere.
Arrays with questionable content.
Show me the script!
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#960
Auto-translated
No, I won't bother people with that; I'll fix it myself later. Right now, I'm working on the creatures, and there's a lot more work to do there...

Whatever
User Avatar
#961
Auto-translated
Ment, this is off-topic, but how did you make the creatures on the map "fight"?
Please explain it to a newbie.
User Avatar
#962
Auto-translated
In the script, I wrote `PlayObjectAnimation("script name of the monster", "attack01", IDLE);` (variations are possible depending on which attack animations the creature has).
 

К А
Стикеры GBF в Telegram
User Avatar
#963
Auto-translated
Please tell me what is wrong here. None of the commands work; it's as if the scripts are being ignored.
SetObjectiveState("Primary01", 2, PLAYER_1);
SetObjectiveState("Primary02", 2, PLAYER_1);
SetObjectiveVisible("Primary03", false, PLAYER_1);
SetObjectiveState("Primary03", 1, PLAYER_1);
SetPlayerStartResources(PLAYER_1, 0, 0, 0, 0, 0, 0, 500);
SetRegionBlocked("net", 1, -1);
SetRegionBlocked("net1", 1, -1);
SetRegionBlocked("net10", 1, -1);
SetRegionBlocked("net11", 1, -1);
SetRegionBlocked("net12", 1, -1);
SetRegionBlocked("net13", 1, -1);
SetRegionBlocked("net14", 1, -1);
SetRegionBlocked("net15", 1, -1);
SetRegionBlocked("net16", 1, -1);
SetRegionBlocked("net17", 1, -1);
SetRegionBlocked("net18", 1, -1);
SetRegionBlocked("net19", 1, -1);
SetRegionBlocked("net20", 1, -1);
SetRegionBlocked("net21", 1, -1);
SetRegionBlocked("net22", 1, -1);
SetRegionBlocked("net3", 1, -1);
SetRegionBlocked("net4", 1, -1);
SetRegionBlocked("net5", 1, -1);
SetRegionBlocked("net6", 1, -1);
SetRegionBlocked("net7", 1, -1);
SetRegionBlocked("net8", 1, -1);
SetRegionBlocked("net9", 1, -1);
function winF (Nicolai)
SetObjectiveState("Primary01", 3, PLAYER_1);

end;

function vhodF (Nicolai)
SetObjectiveState("Primary02", 3, PLAYER_1);
Trigger(OBJECT_TOUCH_TRIGGER, "vhod", nil);
SetObjectiveState("Primary03", 2, PLAYER_1);

function vyhodF (Nicolai)
SetObjectiveState("Primary03", 3, PLAYER_1);
Trigger(OBJECT_TOUCH_TRIGGER, "vyhod", nil);
end;

Trigger(OBJECT_TOUCH_TRIGGER, "vhod", "vhodF");
Trigger(OBJECT_TOUCH_TRIGGER, "vyhod", "vyhodF");
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER, "winna", "winF");
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
#964
Auto-translated
Juss456
Please tell me what is wrong here. None of the commands work; it's as if the scripts are being ignored.
Let's copy the error from the console.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#966
Auto-translated
It seems like the `end` keyword is missing before the `function vyhodF` declaration.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#967
Auto-translated
Yeah, I wasn't very attentive when I wrote that. But it still doesn't solve the problem.
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
#968
Auto-translated
Enable the console. Without it, writing scripts will be very difficult. If it doesn't work, and you've done everything correctly, try creating a new profile. It worked for me.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#969
Auto-translated
Thank you very much, everything is working now.
Кампании для 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
#970
Auto-translated
How do I create a function similar to resurrecting Nikolai in a campaign? I found that using the reserve call works, and it's very convenient. However, I couldn't find in the scripts how to add a hero to the reserve. Can anyone help?

Added 12 minutes later
I found the reserve list, but now I don't know how to add campaign heroes to it.

Whatever
In reply to Heroist
User Avatar
#971
Auto-translated
Add any hero to the list, then in MapProperties\players\0-7\ReservedHeroes\, click ... and in the window that appears, click ... (in the Shared column). Then, select the hero you want from the list on the left.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: leyu