Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
11 years ago
Auto-translated
How can I use a script to give a hero a scroll with a specific spell?
 Создается карта про эльфов: Воссоединение - готовность 71%
In reply to RedHeavenHero
User Avatar
11 years ago
Auto-translated
RedHeavenHero
Place the scroll with this spell on the map, and use MakeHeroInteractWithObject(hero_name, scroll_name).
And what if you need to take this scroll from the hero and then give it back to him?
I want the hero to be able to use the scroll only in one place, and when he leaves that place, the scroll disappears, and when he returns, it reappears.
 Создается карта про эльфов: Воссоединение - готовность 71%
User Avatar
11 years ago
Auto-translated
Is it possible to remove a spell from a hero?
 Создается карта про эльфов: Воссоединение - готовность 71%
User Avatar
11 years ago
Auto-translated
If it’s some kind of travel spell, you can create a new one in an available slot and toggle the ability to use it on and off at the desired moments.
 

К А
Стикеры GBF в Telegram
In reply to Spectral
User Avatar
11 years ago
Auto-translated
And can’t you remove the artifact scroll?
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Ment
User Avatar
11 years ago
Auto-translated
Ment
If it's some kind of travel spell, you can create a new one in a free slot and turn on/off the ability to use it at the right moments.
How can I change the icon and description of a spell instead of summoning Ilm-Hijdra using a script?
 Создается карта про эльфов: Воссоединение - готовность 71%
User Avatar
11 years ago
Auto-translated
How can I change the icon and description of a spell, instead of summoning Ilm-Hijdra, using a script?
Hmm... I forgot that your mod map is standalone. Well, then it's going to be problematic.
-----
However, I'll note that you don't necessarily have to focus on Ilm-Hijdra. There are other spell slots available, but it will still be a mod and it may conflict with other mods.
 

К А
Стикеры GBF в Telegram
User Avatar
11 years ago
Auto-translated
Is it possible to create an animation of the gate opening on the map if a fortress wall with a gate is placed?
 Создается карта про эльфов: Воссоединение - готовность 71%
User Avatar
11 years ago
Auto-translated
Hello! I want to create a battle on a world map using scripts, but I don't know how to make the battle start only when a hero reaches that location. I think it has something to do with triggers, but I haven't been able to make it work. An example of this can be found in the "In the Wake of Gods" campaign, in the third or fourth mission. There, you can also shoot at cities from a catapult.
User Avatar
11 years ago
Auto-translated
You create a region in the editor and name it. In the script, you write something like this: ``` function battle1(hero, region) if GetCurrentPlayer() ~= 1 then return end -- player check StartCombat(hero, nil, 3, -- number of units (3) CREATURE_MILITIAMAN, 45, -- 45 militiamen CREATURE_ARCHER, 23, -- 23 archers CREATURE_VINDICATOR, 10, -- 10 vindicators nil, "battle1_result") end function battle1_result(hero, result) if not result then return end Trigger(REGION_ENTER_AND_STOP_TRIGGER, "region_name", nil) end Trigger(REGION_ENTER_AND_STOP_TRIGGER, "region_name", "battle1") ``` You customize the army to your liking.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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

Statistics

Welcome our newest member: recijeb