Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to Warrior777
User Avatar
Auto-translated
function am()
local old = 8
while 1 do
local count = 0
for i=36,43 do
count = count + (HasArtefact("Muscip", i) or 0)
end
if count ~= old then
if old == 8 then
SetObjectiveState("obj", OBJECTIVE_ACTIVE);
sleep(1) -- this is what was missing for it to work properly
end
if count == 8 then
SetObjectiveState("obj", OBJECTIVE_COMPLETED);
else
SetObjectiveProgress('obj', count);
end;
old = count
end;
sleep(5);
end;
end;
It's because of such trivial things that so many problems arise! :mad:
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Exactly! That's what was missing! The script is working now!
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
Is there a script that prevents a specific hero from acquiring a particular skill? I have the following situation: there is an artifact hidden on the map that needs to be found, but it is hidden in such a way that a hero with the "Silent Stalker" skill will discover it too quickly, which I would not like. Moving the artifact to another location is not possible, as this would require rearranging many regions.

Added after 19 hours and 57 minutes
Or, please tell me how to prevent the fog of war from disappearing in a specific area of the map, as in the last mission about Argil? I read about this, but unfortunately, I didn't really understand it...
User Avatar
Auto-translated
SetWarfogBehaviour(onLand, onSea);
Instead of onLand, write 0 so that the player cannot "remove" the fog of war while moving on land; otherwise, write 1.
Instead of onSea, write 0 so that the player cannot "remove" the fog of war while moving on water.
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
Maybe I'm saying something silly, but won't the fog now be unremovable in a "specific area"? I thought it was supposed to be like that across the entire map...

Whatever
User Avatar
Auto-translated
Yes, it applies to the entire map. But in principle, you can play with this feature, enabling and disabling it using a trigger.
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
Sorry if I'm posting in the wrong place...
Could you please advise me on how to make multiplayer maps with allied factions?
Here's an example of what I want to achieve:
There's a map called Warlords (8 players, Tribes of the East 3.1).
How can I make it so that players on different continents are allied? (i.e., red with orange (1+6), purple with green, etc.)? I'm just tired of playing deathmatch.
And my second question is about maps: how can I add more mountains and "gates" (like in the map above, before entering the city's territory - there are gates guarding the passage)?
Thank you!
User Avatar
Auto-translated
The answer to the first question can be found here: /topic/2788/
Regarding the second question: gates are located in the objects section, specifically in the "All-terrain objects" tab, and mountains are accordingly located in the tabs corresponding to your terrain type (mountains on grass are in the "grass" tab, for example). You can also create mountains using Tiles by creating irregularities on the surface, painting a different terrain type on them, and marking the result with the mask tool so that such mountains are impassable.
 

К А
Стикеры GBF в Telegram
User Avatar
Auto-translated
Ment, thank you! But I couldn't open the L2 map in the editor – it needs an h5m map, and there are only xdb files in the L2 folder. I tried creating an h5m archive, but the editor wouldn't open it...
I solved the problem by downloading an h5m map.
User Avatar
Auto-translated
Can anyone suggest a way to determine, using scripts, which game mode is active: multiplayer or single-player?
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
Auto-translated
Dyrman
Does anyone have a suggestion for how to determine, using scripts, which game mode is running: multiplayer or single-player?
Ask the player directly in a message at the start of the map. Or, check the status of all players – whether they are controlled by the computer or by a human. If all players except one are computers, then the mode is single-player. And rely on the fact that no one will launch a pseudo-single-player game through multiplayer (a hotseat game against only computer opponents).
Разработчик Heroes 5.5 WarGame Edition.
Сайт проекта - пока неактивен
Автор Асимметричных шахмат
In reply to Nargott
User Avatar
Auto-translated
Nargott
Ask the player directly in a message at the start of the map.
And what to do if the player makes a mistake?

Added after 32 seconds
Nargott

Or check the status of all players – whether they are AI or human. If all but one are AI, then it's single-player mode.
You're wrong. Launching through multiplayer and simply setting the opponent to AI will give you the same result. Therefore, you can't determine it that way.

Added after 5 minutes
Nargott
And rely on the fact that no one will launch a pseudo-single-player game through multiplayer (hotseat against AI).
O_o and how do you track that?
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
Auto-translated
Dyrman
What should you do if the player makes a mistake?

Added 5 minutes ago
You're wrong. Launching it through multiplayer and simply setting the AI as an opponent will yield the same result. Therefore, it cannot be determined this way.
I AM NOT wrong. Read the paragraph to the end.

There is also a third way. Define a test function that will 100% work differently in single-player and multiplayer. Run it and, based on the results, determine whether it's single-player or multiplayer.
Разработчик Heroes 5.5 WarGame Edition.
Сайт проекта - пока неактивен
Автор Асимметричных шахмат
In reply to Nargott
User Avatar
Auto-translated
Nargott
I AM not mistaken. Read the paragraph to the end.
Either write the entire message at once or add it at the bottom so that there is a line "added after..."!

Added after 50 seconds
Nargott
There is also a third way. Define a test function that will 100% work differently in single-player and multiplayer. Run it and, based on the results, mark whether it is single-player or multiplayer.
This is not a solution, but just guesses.

I haven't seen a single solution yet. Everything is around and about.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
Auto-translated
Dyrman

This isn't a solution, just guesses.

I haven't seen a single solution yet. It's all vague and indirect.
This is the solution.
If the scripts behave differently in single-player and multiplayer, then there must be a sequence of actions that will work differently in both. All you have to do is find it through trial and error.
Разработчик Heroes 5.5 WarGame Edition.
Сайт проекта - пока неактивен
Автор Асимметричных шахмат

Statistics