Posts from Scripts
GetSavedCombatArmyHero()
GetSavedCombatArmyCreaturesCount()
GetSavedCombatArmyCreatureInfo()
Example:
COMBAT_WINNER = 1;
COMBAT_LOSER = 0;
Trigger(COMBAT_RESULTS_TRIGGER, 'CombatResult');
function CombatResult(id)
local n_stacks, creature, count, died;
-- analysis of the losing side
n_stacks = GetSavedCombatArmyCreaturesCount(id, COMBAT_LOSER);
for i = 0,(n_stacks-1) do
creature, count, died = GetSavedCombatArmyCreatureInfo(id, COMBAT_LOSER, i);
end
-- analysis of the winning side
n_stacks = GetSavedCombatArmyCreaturesCount(id, COMBAT_WINNER);
for i = 0,(n_stacks-1) do
creature, count, died = GetSavedCombatArmyCreatureInfo(id, COMBAT_WINNER, i);
end
end
n_stacks = GetSavedCombatArmyCreaturesCount(id, COMBAT_LOSER);
for i = 0,(n_stacks-1) do
creature, count, died = GetSavedCombatArmyCreatureInfo(id, COMBAT_LOSER, i);
end
Why does i start from 0 instead of 1?
Is it possible to open gates from an Arena Object using scripts, similar to what was seen in the Exiled map?
P.S. - What script do I need so that the enemy hero just stands still?
Hello everyone! I'm new to the site and a beginner mapmaker. Actually, I'm not a mapmaker at all, I don't know anything about scripts, but let's get to the point. I made a map, and what script do I need so that when my hero enters a specific region, he stops and the victory is recorded?
P.S. - What script do I need so that the enemy hero just stands still?
function win(hero)
if hero == "scripted hero name" then
Win()
end
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "region", "win")2. EnableHeroAI("scripted hero name", nil)
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
The question is not very clear.
ColouredText - список заклинаний и их уровень в описании существ-колдунов
Added 12 minutes ago
[/U]Here's another question: How do I disable the quest to find a town within 7 days? (Since it's impossible to obtain a town in the mission).
There should be a parameter called City_in_a_week.
Цикл кампаний "Дыхание Смерти" из трёшки в четвёртом исполнении
Учебная карта
Астралия
За Королеву!
Подземелья и Дьяволы
Отголоски войны
Освобождение
ColouredText - список заклинаний и их уровень в описании существ-колдунов
Open the map tree. There, open the settings for the corresponding PLAYER.
There should be a parameter called City_per_week.
Added 3 minutes ago
Ah, I found it and configured it. Huge thanks to Quant :3
Added 55 minutes ago
Another question, not very important, but I really want to know:D How do I upload the "Please Wait, Loading" image? This is the one that appears when the mission is loading.
How do I load the "Please Wait, Loading" image? The one that appears during mission loading.
REGULAR
CONVERT_TRANSPARENT
CLAMP
TF_DXT1
1024
768
0
1
0
-1088146910
true
true
false
true
false
In this file, you can see the name of the file in dds format, and its parameters (TF_DXT1, width, and height).Create a dds image.
Put these files into an archive with the map, where there are many files.
Then, open map.xdb in Notepad.
Find the line
and replace it with
Цикл кампаний "Дыхание Смерти" из трёшки в четвёртом исполнении
Учебная карта
Астралия
За Королеву!
Подземелья и Дьяволы
Отголоски войны
Освобождение
Added 18 minutes later
Regarding the previous question: Is the archive with the game its root directory, or is it some other folder?