Miliastra Wonderland Lua API

OnEnable

function OnEnable()

Called when the active state of the Client Control that the script is attached to changes to true.

  • Also called after OnInit for initally active Client Controls that have been pre-placed in the Client Control Container.
  • Ignored by Module scripts.

Stage Start Lifecycle Function Call Order

  1. Top Level Code > OnInit - Global Script
  2. Top Level Code > OnInit - Client Control Hierarchy
  3. OnEnable - Client Control Hierarchy
  4. OnStart - Client Control Hierarchy
  5. OnEnable - Global Script
  6. OnStart - Global Script
  7. OnUpdate > OnLevelUpdate - Global Script
  8. OnUpdate > OnLevelUpdate - Client Control Hierarchy
  9. OnDestroy - Global Script (On Stage End)