Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnregisterStateDriver

Last wiki revision 2020-04-12

UnregisterStateDriver cancels a prior call to RegisterStateDriver for a given frame and stateid. UnregisterStateDriver(frame, state)

frame

  • the frame which you wish to unregister the state driver from

state

  • String - an arbitrary identifier string for this conditional (coerced into lower case), or "visibility"

none

It is not necessary to use this function when overwriting an existing state driver with a new one; simply calling RegisterStateDriver will overwrite a previous one provided the state-id is the same. Only use UnregisterStateDriver when the desired result is halting the automation entirely.

The implementation is included as part of FrameXML in FrameXML/SecureStateDriver.lua.

Registering a state driver to show a frame during combat:

local frame = CreateFrame("Frame") RegisterStateDriver(frame, "visibility", "[combat]show;hide"); -- the frame is now seen during combat

Removing the state driver: UnregisterStateDriver(frame, "visibility"); -- the frame no longer responds to entering/leaving combat

Source

https://warcraft.wiki.gg/wiki/API_UnregisterStateDriver · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.