Skip to content

Current questions and answers regarding the map editor.

User Avatar
#3872
Auto-translated
Here's another question...
If I script a hero's behavior in battle, what do I need to do to prevent the log from displaying "defense" after their turn?
For example:

function DefenderHeroMove(heroName)
print ("SPELL_PRAYER!");
UnitCastGlobalSpell(GetDefenderHero(), SPELL_PRAYER);
defender_turn = defender_turn +1;
return not nil;
end;

The spell is cast, but the battle log under the map shows:
Prayer...
and then, Randall: defense.
Ideally, he should just end his turn after casting the spell.
Of course, it's not a major issue, but it's annoying.

I tried adding a sleep command afterward, but it doesn't help.
Мои карты

Возрождённый v 1.5 (обновление от 25/09/2016) :smile24:

готовится продолжение.

Великая Пустыня ( 25%) - про Маркела
Тьма над Иролланом (0%) - про Николаса

Мои моды (скорректированы мод на чумных энтов и циклопов зомби)