Added 43 seconds later
It's strange that the game crashes; script errors are usually not that fatal.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
New here? I'm Roha — want a quick tour?
Eleondor,
it's in the map script.
Well, I have Windows 7 x64 Russian SP1, maybe that's the reason, although I set compatibility mode everywhere - both for the editor and the game.
The ID is probably in the documentation - IDs_for_scripts.pdf.
Added after 43 seconds
It's strange that the game crashes; script errors are usually not that fatal.
. I was using the editor normally, then suddenly I enter and there is nothing in the toolbar—no artifacts, no cities, etc. What should I do?
Is it possible to force the AI to hire a specific hero who is in the tavern?
Is it possible to force the AI to hire a specific hero who is in a tavern?
If a hero dies, does he end up in a tavern and need to be hired again?
Is there a direct way to find out the hero's losses in battle?
COMBAT_WINNER = 1;
COMBAT_LOSER = 0;
Trigger(COMBAT_RESULTS_TRIGGER, 'CombatResult');
function CombatResult(id)
-- we analyze only for the main hero
if(GetSavedCombatArmyHero(id, COMBAT_WINNER) ~= player_hero) then return end
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);
-- here you can analyze or save the data somewhere
-- creature - creature ID, count - their number at the beginning of the battle, died - how many died
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