whoward69
DLL Minion
... would knowing the capturing unit, the captured unit and if the game core is going to kill the captured unit be enough?
Code:
GameEvents.UnitCaptured.add(function (iByPlayer, iByUnit, iCapturedPlayer, iCapturedUnit, bWillBeKilled)
local pCapturingUnit = Players[iByPlayer]:GetUnitByID(iByUnit)
local pCapturedUnit = Players[iCapturedPlayer]:GetUnitByID(iCapturedUnit)
-- pCapturingUnit captured pCapturedUnit, at this point both units are still alive
-- both units are currently on the same tile
if (bWillBeKilled) then
-- the game core will kill pCapturedUnit just after this function exits
end
end