Skip to content
User Avatar
#3271
Auto-translated
Knight of the Abyss
Thank you, I will definitely do that. And another question, could someone share an example of a StartCombat script where the enemies include, for example, a stack of militia and another stack of archers, each with 10 units? I can write a StartCombat for a single type of creature, but I can't figure out how to add a full army of different units; I don't understand which variables to write for the second stack, and it would be easier to understand with a live example. Thank you in advance.

The number of stacks is determined by the third parameter in StartCombat, followed by pairs of [creature ID - number of creatures in the stack]. The number of these pairs corresponds to the number of stacks. Therefore, for the described case, the function would look something like this:
StartCombat('hero_name', nil, 2, CREATURE_MILITIAMAN, 10, CREATURE_ARCHER, 10)
Нет войне.