Skip to content

Current questions and answers regarding the map editor.

User Avatar
#1056
Auto-translated
1. Is there a way to determine whether a hero is controlled by a player or AI? (e.g., for multiplayer maps, so that if playing against the AI, it would be possible to additionally instruct the behavior of AI heroes using scripts).
Only in 3.1 using IsAIPlayer(playerId); (determines whether the player is a human or the AI).
2. Can anyone provide an example (brief) of how to use scripts to change the "amount" of creature growth in buildings (not cities)?
Changing the growth rate with scripts? I haven't tried. With a mod – please do.
3. Is it possible to express a function through a script so that the following happens: a player enters a battle for a castle, captures it, and if certain n conditions are met, they immediately receive a random hero "from the city's roster." Is this possible?
It is possible. In an infinite loop, check the castle's ownership; if it belongs to the desired player, give them a hero and exit the loop. It will be difficult to make it random, but a specific hero is possible.
 

К А
Стикеры GBF в Telegram