OnTrackedStatsEvent - Form

Revision as of 15:26, 18 October 2011 by imported>Rhavlovick (1 revision: Clobber re-import by Henning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ActiveMagicEffect Script, Alias Script, and Form Script

Event called when tracked stats are updated - if this active magic effect/alias/form is registered for it.

Syntax

Event OnTrackedStatsEvent(string asStat, int aiStatValue)

Parameters

Example

Function SomeFunction()
  RegisterForTrackedStatsEvent() ; Before we can use OnTrackedStatsEvent we must register.
EndFunction

Event OnTrackedStatsEvent(string asStatFilter, int aiStatValue)
    if (asStatFilter == "Barters")
        if (aiStatValue == 50)
	    Debug.Trace("Player has bartered 50 times.")
        endif
    endif
endEvent

Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
  • This event is not relayed to any aliases or magic effects attached to the form.

See Also