
Custom script: Hide other units NamePlates for casts
carlos5152 opened this issue ยท 1 comments
Hello
Is there a way to make a script for hiding all non casting units nameplates when other unit/s are casting.
This script currently is implemented in Plater and also as a weakaura that works for default blizzard nameplates so I was wondering if the same can be implemented in ThreatPlates using a custom script.
The specific help I will need with this is how to retrieve list of current units nameplates then be able to hide the units not casting and keep the units currently casting also I will need to listen to UNIT_SPELLCAST_START event or other alternative to know when a unit is currently casting.
Appreciate your help on this and thanks.
Scripting is still just work in progress. I works for simple cases, but I am not sure if it works for the above situation. There are two ways to get all currently shown nameplates:
- Varialble PlatesByUnit from TP
- C_NamePlate.GetNamePlates
With that, you can iterate over all nameplates (when processing a UNIT_SPELLCAST_START) and hide them. It might just be that they get shown by some other part of the code at some point later. You can try to set TPFrame.Active to false to prevent TP from showing them again - that could work.