Skip to content
User Avatar
#2689
Auto-translated
function AttackerUnitDeath(unit)
You can check the unit type:
IsCreature(unit);
Also, there are ready-made functions where all this is already checked; you can use AttackerCreatureDeath instead of AttackerUnitDeath. Quote from Novik's manual:
In the /scripts/combat-startup.lua file, this hook has been replaced with a set of functions:
void AttackerUnitDeath(unitName)
void AttackerHeroDeath(sUnitName)
void AttackerCreatureDeath(sUnitName)
void AttackerWarMachineDeath(sUnitName)
void AttackerBuildingDeath(sUnitName)
void DefenderUnitDeath(sUnitName)
void DefenderHeroDeath(sUnitName)
void DefenderCreatureDeath(sUnitName)
void DefenderWarMachineDeath(sUnitName)
void DefenderBuildingDeath(sUnitName)
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо

Statistics

Welcome our newest member: leyu