Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
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?!