Gerter
function DefenderCreatureDeath(unit)
if(GetCreatureType(unit) == CREATURE_PHOENIX) then
fenix = 0
end
end
как то так
Странно... ничего не происходит. Вот скрипт, если что.( С элементалями тоже неработает)
diff = GetDifficulty() + 1
defender = GetDefenderHero()
attacker = GetAttackerHero()
defender_turn = 0
death = 0
elemental= 0
fenix = 0
function Start()
SummonCreature(DEFENDER,103, 12 * diff,8,9)
SummonCreature(DEFENDER,105, 9* diff,8,2)
end
function DefenderHeroMove()
if elemental == 0 then
elemental = 1
UnitCastGlobalSpell(defender,SPELL_SUMMON_ELEMENTALS )
end
defender_turn = defender_turn + 1
if defender_turn == 1 then
combatSetPause(1)
UnitCastGlobalSpell(defender,SPELL_ARMAGEDDON)
sleep(200)
combatSetPause(nil)
end
if defender_turn == 2 then
SummonCreature(DEFENDER,104, 10 * diff)
if fenix == 0 then
fenix = 1
UnitCastGlobalSpell(defender,SPELL_CONJURE_PHOENIX)
end
end
end
function DefenderCreatureDeath(unit)
if(GetCreatureType(unit) == CREATURE_FIRE_ELEMENTAL ) then
elemental = 0
end
end
death = death + 1
if death == 1 then
print("bbb")
end