Mod:Creation Kit/OnTrackedStatsEvent - ScriptObject

Member of: ScriptObject

Event called when a registered tracked stat equals or surpasses a threshold - if this active magic effect/alias/form is registered for it. Once you receive the event you will be unregistered. (It is a one-shot event)

This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.

Syntax
Event OnTrackedStatsEvent(string asStat, int aiStatValue)

Parameters

 * asStat: The text for the stat being updated. Mod:Creation Kit/List Of Tracked Stats
 * aiStatValue: The updated value of the stat.

Example
Function SomeFunction RegisterForTrackedStatsEvent("Barters", 50) ; Before we can use OnTrackedStatsEvent we must register. EndFunction

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