Originally Posted by Seerah
Check the source name against your name.
|
Thanks for advice! I actually literally just took a wayshrine to test just this. I am wondering if this will only track killing blows, and not kills that you get credit for (IE kills that count towards the cyrodil quest)
Well if I can get killing blows to work I will be happy! I'll report back on my progress
Edit 4: Too many edits. In case any one is wondering, you can get the char name by using GetUnitName("player")
edit 5: WOOOOT got it to work. sort of! I can count killing blows (but not straight of kills)
in case anyone is wondering, my code looks like
Code:
function OnKill( eventCode , result , isError , abilityName, abilityGraphic, abilityActionSlotType, sourceName, sourceType, targetName, targetType, hitValue, powerType, damageType, log )
--d(sourceName)
--d("Unit Name: " .. (GetUnitName("player") .. "^Fx"))
if result == ACTION_RESULT_KILLING_BLOW and sourceName == (GetUnitName("player") .. "^Fx") then
--d("Works")
counter = counter + 1
end
end