Skip to content
User Avatar
#3990
Auto-translated
green belly, here are a couple of hints:
The GetPlayerHeroes() function returns an array of heroes, and the GiveHeroBattleBonus() function takes the name of a single hero as its first parameter. You need to iterate through all the heroes in the array. For example, for PLAYER_2:
for i, hero in hero2 do
GiveHeroBattleBonus(hero, morale bonus, -3);
end
And so on for all opponents.
The zdanie1F() function takes the name of the hero who triggered the trigger as input. This was reflected in the code that Azgalor sent you. You need to check it in HasHeroSkill().
The -- signs are comments, meaning they are not code. I suggest you look at some article about Lua; it will become clearer.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо