Skip to content
#500
Auto-translated
KioM
Well, it doesn't really help; without them, you can't cast spells properly (for example)... So, I decided on the function and logically implemented it using a delay:
function AttackerCreatureDeath(creatureName)
if GetCreatureType(creatureName) ~= 36 then
AttackerDeathCount = AttackerDeathCount-1;
count = GetCreatureNumber(creatureName);
spawnCount = count/3;
if spawnCount ~= 0 then
local x, y = GetUnitPosition(creatureName);
sleep(50);
removeUnit(creatureName);
sleep(5);
SummonCreature(ATTACKER, 36, spawnCount, x, y);
end;
end;
end;
But sleep(50) is a whole 10 seconds, and all this happens in 2 seconds... What could be wrong here? Maybe I messed something up :smile39: ?

Added 7 minutes later
By the way, while browsing the common scripts, I came across a function that isn't mentioned in any guide (or maybe I just didn't look hard enough): showMessage(parameter, some number)

If I understand correctly, this command can be used to send a message to the combat log (where it shows who hit whom and for how much).
I don't know, I'm not very good with combat scripts - they're just too 'fickle'. It seems correct. Maybe you should delete the creature through a variable and summon the creature on the next turn?!

Statistics

Welcome our newest member: wayal