Mod:Creation Kit/GetPropertyValue - ScriptObject

Member of: Mod:Creation Kit/ScriptObject Script

Gets the current value of a property on this script by name.

Syntax
Var Function GetPropertyValue(string asPropertyName) native

Parameters

 * asPropertyName: The name of the property

Return Value
Whatever value the property has.

Examples
ScriptObject combatScript = FormFromOtherMod.CastAs("CombatOverhaul") Var result = combatScript.GetPropertyValue("TargetActor") Actor target = result as Actor if target target.Kill ; Kill them all! endIf
 * Get the value of the "TargetActor" property from the "CombatOverhaul" script
 * We use CastAs to make sure we don't depend on the script we want to call the function on