Connection ErrorBad RequestSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Error Details:
Share Link
RedHeavenHeroStatistics
Registered:
Posts:2,380
#3683
Auto-translated
The computer player should have a random town, and in the map properties, under Player Properties, each player needs to have the "Generate hero in town" checkbox checked and the town specified.
Added 6 minutes later Markel the Imperor
:smile15: Is it possible to influence the behavior of a specific AI hero in battle using scripts? Because it's annoying when, for example, a knight who has mass slow casts it on only one unit, or a demon with the ability to summon a phoenix uses magic arrows. I think you understand what I mean. And if it's possible, where is this described in detail? Sorry for being a noob – I haven't done this in a year :smile15:
Added 1 hour 31 minutes later
Another question. How do I create my own artifact? For example, a ring of vampires (gives the Vampirism spell) or a heavy shield with +5 defense, like in one of the maps. And is it possible to at least gain access to the existing abilities of artifacts so that I can create my own artifact based on them, which has the abilities of several existing ones?
1) Yes, you can give a hero commands to cast specific spells, but this only works in single-player maps. The scripting guide describes the functions that make a hero cast spells: UnitCastAimedSpell, UnitCastGlobalSpell, UnitCastAreaSpell.
2) You cannot create your own artifact; you can only replace an existing one. Usually, they replace rarely used ones: Frída, Princess Aeliana, Ring of the Shadowed. At the same time, you can only create artifacts that change characteristics.