PDA

View Full Version : Register specific player death


Illyrieah
28-01-2007, 08:17 AM
Hello!

Can anyone tell me how I do a RegisterEvent on a specific player's death? I can't figure out the proper syntax.

right now I'm trying;

self:RegisterEvent("PLAYER_DEAD");("PlayerName")


I just can't seem to figure out how to do it properly.

I'm trying to make a counter that tracks the deaths of 2 specific people. I managed to make a death tracker that tracked me, that's easy enough, but tracking specific players is something I'm having difficulty with.

Jumpy
28-01-2007, 09:22 AM
Unless the person is grouped with you I don't think there is an event that is triggered.

Illyrieah
28-01-2007, 06:52 PM
Is there a way to trigger it from the combat log?

Ie. player dies so it says 'Player has died' and as a result that triggers?

Tanitha
28-01-2007, 08:23 PM
I've not investigated LUA, so my advice comes from a pure programming perspective. I'd look for a OnLog event or something similar. Then parse the text to scan for "Player has died" and simply parse to get the name.

Again, no idea if it's possible. But you have me intrigued. Why would this be useful?

Jumpy
29-01-2007, 08:40 AM
The message would appear in the log but only if they are nearby. How near I don't know.

Zillia Tippytoes
30-01-2007, 12:10 PM
Unless the player is grouped with you, you can't track the death event.

The best you could do would be to write code that watches the log and tries to recognize the text generated at that player's death. This would only work when you are relatively close to them at death.

Alternately, if the other player is cooperating with you for this, you could create a specialized add-on that they could install on their end which would send you a message when they die, wherever they die, which you could parse with your own custom add-on.