I tried SetHeroLootable, but it didn't work. I have two types of battles that are launched through a script, where the heroes have artifacts. One battle is launched through StartCombat, and the other is SiegeTown. In both cases, when I defeat the heroes, I get their loot.Maybe I need to write it in a separate function? Because I just put it in the general code of the map.
Put this script at the very beginning of your code; maybe it will work.