Можете объяснить работу функции, вызывающей сражение? Почему при попытке начать бой с героем "Nemor", который резервный и выставлен на карту скриптом ранее (нейтральный герой, первоначально желтый), выдается ошибка, что данный герой не является резервным...
Добавлено через 5 минут
Все в скрипте, что связано с этим героем:
DeployReserveHero("Nemor", 111, 121, 1)
sleep(2)
SetObjectOwner("Nemor", 8)
AddHeroCreatures("Nemor", CREATURE_SHADOW_DRAGON, 5 * diff)
AddHeroCreatures("Nemor", CREATURE_BANSHEE, 10 * diff)
AddHeroCreatures("Nemor", CREATURE_LICH_MASTER, 15 * diff)
AddHeroCreatures("Nemor", CREATURE_NOSFERATU, 25 * diff)
AddHeroCreatures("Nemor", CREATURE_GHOST, 30 * diff)
AddHeroCreatures("Nemor", CREATURE_DISEASE_ZOMBIE, 70 * diff)
AddHeroCreatures("Nemor", CREATURE_SKELETON_WARRIOR, 100 * diff)
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "SkullBatttle", "SkullBatttleScript")
function SkullBatttleScript(hero)
StartCombat(hero, "Nemor",7,
CREATURE_SKELETON_WARRIOR, GetHeroCreatures("Nemor", CREATURE_SKELETON_WARRIOR),
CREATURE_DISEASE_ZOMBIE, GetHeroCreatures("Nemor", CREATURE_DISEASE_ZOMBIE),
CREATURE_GHOST, GetHeroCreatures("Nemor", CREATURE_GHOST),
CREATURE_NOSFERATU, GetHeroCreatures("Nemor", CREATURE_NOSFERATU),
CREATURE_LICH_MASTER, GetHeroCreatures("Nemor", CREATURE_LICH_MASTER),
CREATURE_BANSHEE, GetHeroCreatures("Nemor", CREATURE_BANSHEE),
CREATURE_SHADOW_DRAGON, GetHeroCreatures("Nemor", CREATURE_SHADOW_DRAGON),
nil, "SkullCombatEnd", nil, nil)
end
function SkullCombatEnd(hero, result)
if result then
if IsObjectExists("Nemor") == 0 then
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "SkullBatttle", nil)
MessageBox(path.."necroend.txt")
else
AddHeroCreatures("Nemor", CREATURE_SHADOW_DRAGON, 5 * diff)
AddHeroCreatures("Nemor", CREATURE_BANSHEE, 10 * diff)
AddHeroCreatures("Nemor", CREATURE_LICH_MASTER, 15 * diff)
AddHeroCreatures("Nemor", CREATURE_NOSFERATU, 25 * diff)
AddHeroCreatures("Nemor", CREATURE_GHOST, 30 * diff)
AddHeroCreatures("Nemor", CREATURE_DISEASE_ZOMBIE, 70 * diff)
AddHeroCreatures("Nemor", CREATURE_SKELETON_WARRIOR, 100 * diff)
end
end
end