Skip to content
User Avatar
#4045
Auto-translated
Dogenator, you need to create a separate thread that will iterate through all the player's heroes: ```lua while(1) do local heroes = GetPlayerHeroes(ID_игрока); for i, hero in heroes do if(HasHeroSkill(hero, ID_скилла) and (not KnowHeroSpell(hero, ID_спелла))) then TeachHeroSpell(hero, ID_спелла); end end sleep(50); end ``` But it seems there is no function to remove a spell; maybe it can only be done with a cheat?
Dogenator
Does the touch trigger work from day one, or can you set it to work from a specific day?
You can check what day it is in the touch trigger handler, or you can set the touch trigger to not activate immediately at the start, but in a new day trigger when the desired day arrives. The trigger works from the moment the Trigger() function is executed.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо