Mod:Creation Kit/SetPropertyValue - ScriptObject

Member of: Mod:Creation Kit/ScriptObject Script

Sets the value of a property on this script by name, synchronously.

Syntax
Function SetPropertyValue(string asProperyName, Var aValue) native

Parameters

 * asPropertyName: The name of the property to set
 * aValue: The value to set the property to

Return Value
None.

Examples
ScriptObject combatScript = FormFromOtherMod.CastAs("CombatOverhaul") combatScript.SetPropertyValue("DamageMultiplier", 1.0)
 * Set the value of the "DamageMultiplier" property on the "CombatOverhaul" script
 * We use CastAs to make sure we don't depend on the script we want to call the function on
 * note the '.0' to ensure it is a float, 1 won't work for float properties