Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
There is CreateArtifact.
Oh... I didn't even notice that. Thank you! And could you please tell me how to give an enemy hero infinite movement points? The standard movement isn't enough to carry out my plan...
User Avatar
Auto-translated
while IsHeroAlive('hero_name') do ChangeHeroStat('hero_name', 7, 10000) sleep() end ``` And run it in a separate thread.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Is it possible to implement a feature where, upon a hero entering a specific region, one unit stack transforms into another unit stack, maintaining the same number of units?
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



In reply to inQizitOr
User Avatar
Auto-translated
inQizitOr
Is it possible to make it so that when a hero enters a specific region, one unit of creatures transforms into another, while maintaining the same number?

You could place "another unit" with the desired number of creatures in a corner of the map and, upon entry, remove the first unit and set the position of the second unit to the coordinates of the first. You could also add some epic animation...

Added 8 minutes later
Or does "unit" refer not to a mob on the map, but to creatures in the hero's army?
In reply to Рыцарь Бездны
User Avatar
Auto-translated
Knight of the Abyss
Well, you could place another unit somewhere in the corner of the map with the required number of warriors, and when the first unit enters, remove it and set the position of the second unit to the coordinates of the first. You could also add some epic animation...

Added 8 minutes later
Or are you talking about a unit on the map, not as a creature in a hero's army?
No, I know animations well when it comes to maps. I'm talking about the hero's army. For example, according to the plot, the main hero, a knight, before entering the lands of the dwarves, where there is snow, orders all the horses to be released because there will be nothing for them to eat. And all of Isabel's knights become zealots.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



In reply to inQizitOr
User Avatar
Auto-translated
inQizitOr
No, I know animations for maps very well. In the hero's army. For example, according to the plot, the main hero, a Knight, before entering the lands of the Dwarves, where there is snow, orders all the horses to be released because there will be nothing for them to eat. And all the Knights of Isabel become zealots.

I don't know how correct this is; I'm not an expert in this, but as far as I'm concerned, there's an option using GerHeroCreatures.

if GetHeroCreatures("hero", Knights of Isabel); == 10 then
RemoveHeroCreatures("hero", Knights of Isabel, 10);
AddHeroCreatures("hero", Zealots, 10);
elseif GetHeroCreatures("hero", Knights of Isabel); == 9 then
RemoveHeroCreatures("hero", Knights of Isabel, 9);
AddHeroCreatures("hero", Zealots, 9);

And so on, from the starting number of Knights down to 1. I don't have any more ideas. It's better to wait for advice from more experienced script writers.
In reply to inQizitOr
User Avatar
Auto-translated
inQizitOr
No, I know animations for maps very well. In the hero's army. Like, according to the plot, the main hero, a Knight, before entering the lands of the Dwarves, where there is snow, orders all the horses to be released because they will have nothing to eat. And all of Isabel's Knights become zealots.
Something like this:
local n = GetHeroCreatures("hero_name", CREATURE_CHAMPION)
if n > 0 then
RemoveHeroCreatures("hero_name", CREATURE_CHAMPION, n)
sleep()
AddHeroCreatures("hero_name", CREATURE_VINDICATOR, n)
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Another question. I want to create an animation on the world map where a cyclops chops down a tree, but I can't find or select a sound and effect that's similar to the one in the prologue (Raven's Slaughter). How can I do this best?
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



User Avatar
Auto-translated
How can I "disable" a computer player so that their heroes stand in one place and do nothing, but they can still build and recruit units in their cities?

Added after 2 hours 37 minutes
And how can I make a hero carry over to a new campaign with all their skills and some artifacts?

Added after 23 hours 53 minutes
RedHeavenHero
You can check the script of the map itself. It should be in data/data.pak/Maps/Scenario/A2C0M1/.
Please help. My questions are in the post above.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



User Avatar
Auto-translated
How do you "disable" a computer player so that their heroes stand in one place and do nothing, but they can still build and recruit units in cities?
If it's still relevant, you need to do this for all heroes:
EnableHeroAI('hero_name', nil);
I can't offer any advice regarding campaigns.
In reply to Jack_of_shadows
User Avatar
Auto-translated
Jack_of_shadows
if it's still relevant, then you need to add this to all heroes:
EnableHeroAI('hero_name', nil);
I can't offer any advice regarding campaigns.
Yes, thank you.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



Auto-translated
Do the creatures created by campaign and scenario authors have system names? If so, how can they be determined?
In reply to serovoy
User Avatar
Auto-translated
serovoy
Do the scenarios created by campaign and map authors have system names? If so, how can they be determined?
If you want to open campaign scenarios in the editor, you just need to expand the editor, then click Resource --} Open Resource --} and select the desired maps from the Scenario list. You'll figure it out from there.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



Auto-translated
Oops, I missed a word in my hurry! I meant the heroes created by the authors of campaigns and scenarios.

Statistics

Welcome our newest member: Emil