Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
14 years ago
Auto-translated
thanks a lot.

Added 3 minutes ago
Does anyone know a script where you stand in a region, and then an army appears? Also, I click on Object Properties, and nothing changes. Why?

Added 2 minutes ago
I clicked there, and nothing changes. There's no window with settings or anything else.
Sincerely.
In reply to GnomKRAG
User Avatar
14 years ago
Auto-translated
GnomKRAG


Added 3 minutes ago
Does anyone know a script where, when you enter a region, an army is added to you? Also, I click on Object Properties, but nothing changes. Why?

Example:


function addArmyFunction(hero)
	Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'rArmyAdd', nil);
	AddHeroCreatures(hero, 11, 25);
end;

Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'rArmyAdd', 'addArmyFunction');
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
14 years ago
Auto-translated
Have you selected the creatures on the map? If not, it shouldn't work – you need to select the object first, and then click on object properties. Best regards. P.S. Maybe it would be better to show it visually? With screenshots?
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
14 years ago
Auto-translated
Djulian13, I meant character stats, and is it possible to open them with a space, like placing a peasant but giving him different stats, or is that not possible?
User Avatar
14 years ago
Auto-translated
You can do this using a mod. It is best to do this in an advanced editor or using an archiver.
 

К А
Стикеры GBF в Telegram
User Avatar
14 years ago
Auto-translated
and what should I press in the extended editor? Please tell me.
Sincerely.
User Avatar
14 years ago
Auto-translated
Take the advanced editor panel (it's in the lower left corner for me), right-click on the frame, and in the context menu that appears, select "Select Tables" and check the "Creature" box in the list, then click "OK". Go to "Creature" in the dropdown list of the same panel. Select the desired creature in the tree below. The "MapPropertiesTree" panel (in the upper left corner for me) now contains information about this creature: you need to adjust it.
 

К А
Стикеры GBF в Telegram
User Avatar
14 years ago
Auto-translated
thank you. Ment

Added after 18 hours and 57 minutes
Heroes of Might and Magic V - Epic War Age is a large mod for Heroes 5.
Can you tell me why dwellings and neutrals don't work in mapmaking?
14 years ago
Auto-translated
Are you sure you're in the right forum? It seems to me that this topic isn't for discussing bugs in the game or mods for it. Regarding the issue – it could be a conflict between the mod and another mod, or with the game version – there are various possibilities. Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
14 years ago
Auto-translated
Oh, sorry, I accidentally posted it here out of habit. My apologies.
Sincerely.
In reply to GnomKRAG
User Avatar
14 years ago
Auto-translated
GnomKRAG
Oh, sorry, I accidentally posted here out of habit. My apologies.
Sincerely.
How do I make a non-player character (NPC) hero follow the main hero around the map?
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
In reply to Олегарх
User Avatar
14 years ago
Auto-translated
Olegarkh
How do I make a non-player hero follow the main hero on the map?

local x, y = GetObjectPosition(MainHero);
MoveHero(hero, x+random(2), y-random(2), -1);

in an infinite loop

Alternatively, you can make it more complex by checking the distance between the heroes, and then use MoveHeroRealTime to move the hero, I think that's how it's done in the campaigns.
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
In reply to KioM
User Avatar
14 years ago
Auto-translated
KioM
local x, y = GetObjectPosition(MainHero);
MoveHero(hero, x+random(2), y-random(2), -1);

in an infinite loop

P.S. It can be made more complex with a check for the distance between heroes, and then the hero can be moved using MoveHeroRealTime; I think this is how it is done in the campaigns.
How to create an infinite loop?

local x, y = GetObjectPosition("Hero2");

function Moov()
while h==1 do
MoveHeroRealTime("Hero3", x+1, y, -1);
end;

I wrote it like this, but the script doesn't work; it says something about x in the line MoveHeroRealTime("Hero3", x+1, y, -1);. As far as I understand, there should be a number there, but instead, it's a variable.
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
User Avatar
14 years ago
Auto-translated
if that's the case, then `local` is not needed, and everything will work fine.
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
User Avatar
14 years ago
Auto-translated
What is SetStandState actually used for?

Added 1 hour 51 minutes ago
Oligarch
What is SetStandState actually used for?
Okay, here's the deal.
h=1;
while h==1 do
x, y = GetObjectPosition("Hero2");
MoveHeroRealTime("Hero3", x+1, y, -1);
end;
end;
When I write it this way, the game freezes completely when launched.

h=1;
function Moov()
while h==1 do
x, y = GetObjectPosition("Hero2");
MoveHeroRealTime("Hero3", x+1, y, -1);
end;
end;
When I attach it to a function, there are no errors, but nothing happens. h=1;

function Moov()
while h==1 do
x, y = GetObjectPosition("Hero2");
MoveHeroRealTime("Hero3", x+1, y, -1);
end;
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGGER, "reg", "Moov";) <---this is not a smiley, it's a closing parenthesis))
When entering the region "reg", the game freezes again. Could it be because of the "while" loop?
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля

Statistics

Welcome our newest member: recijeb

Users Online 3 users 155 guests