Skip to content
User Avatar
#3991
Auto-translated
Jack_of_shadows
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 advise you to look at some article about lua, it will become clearer.
Thank you, I corrected the hero names and added loops, and it worked!