Jump to content

Kill events no longer contain a valid player name in the initiator.


PilotPyles

Recommended Posts

I didn't know that the event ever passed a player name with the event, neither for victim nor victor. You should be able to derive the victor with initiator:getPlayerName() - if the result is non-nil a player killed event.target. Be sure to guard initiator.getPlayerName against not being implemented.

If target still exists, you can likewise get the player's name who got killed. Else, catch the birth and playerEnterUnit events, and note down that unit's name indexed by the player who controls it. When the kill event comes, simply looking up the unit's name in your list should return the name of the player who got deep-sixed.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...