StopVisualEffects does not raise an error if there are no effects, so a check is not necessary.
Effects do not need to be disabled while the mob exists.
function NHF_RemoveMobEffects(hero, mob)
while IsObjectExists(hero) and IsObjectExists(mob) do
sleep()
end
if not IsObjectExists(mob) then
StopVisualEffects(mob .. "_Effect_Tag")
end
end
function NHF_Touch_mobs_F(hero,mob)
-- ... --
if mob > "NHF" and mob < "NHG" then
startThread(NHF_RemoveMobEffects, hero, mob)
end
-- ... --
end
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4