Skip to content

Current questions and answers regarding the map editor.

User Avatar
#2075
Auto-translated
Ment
Here's an example of how it can be used:
function DefenderCreatureMove(Unit)
if GetCreatureType(Unit)==CREATURE_SNOW_APE then
SummonCreature(DEFENDER, 54, GetCreatureNumber(Unit), 13,8);
end;
end;
What will happen: each time it's an enemy's turn and a Yeti is present, a number of creatures with ID 54 will be summoned, equal to the number of Yetis in the stack. It looks a bit unconventional for a scripting language, but it works.

If a player can have any number of creature stacks and any number of creatures in those stacks, how can you count the number of creatures in each stack at the beginning of the battle, and then perform a comparison for each of them?
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля