PDA

View Full Version : A Combat Tracker question



Stv
May 29th, 2020, 15:57
I'm once again in need assistance (surprise surprise).

Can someone tell me which function is called when an NPC is deleted from the combat tracker ?
I need to grab it's Nodename before it's deleted.

Cheers, Steve.

Moon Wizard
May 29th, 2020, 21:02
I couldn't remember if something like this was built already; but it appears there was:
CombatManager.setCustomDeleteCombatantHandler(<function>);

This function is called with the node to be deleted as a parameter. From there, you'd have to determine whether the node is a PC or NPC before performing your NPC deletion code.

Regards,
JPG

Stv
May 29th, 2020, 21:50
Thanks Moon,
I'll have a look at that, hopefully it'll help.

Cheers, Steve.