Difference between revisions of "SetActorValue"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Neuman
imported>Vswe
m (Added Search Terms)
 
(8 intermediate revisions by 6 users not shown)
Line 8: Line 8:
SetActorValue sets the stat's base value to the new value.  
SetActorValue sets the stat's base value to the new value.  


NOTE: Although called on a reference, this function actually changes the value on the base actor (thus the base value on all references of that base actor). Note also that [[ModActorValue]] modifies the stat value only on the reference, and so is usually preferable.
==Notes==
*Although called on a reference, this function actually changes the value on the base actor (thus the base value on all references of that base actor). Note also that [[ModActorValue]] modifies the stat value only on the reference, and so is usually preferable.
*For the player, this will not modify base health. Base health is determined by (Endurance * [[fPCBaseHealthMult]]). For example, a level 2 player with 40 Endurance will have 80 base health (40 * 2 = 80) and 4 more health (from the Endurance level bonus). If you use '''player.SetAv Health 100''' the player will have 180 total health - 80 from base health, and 100 for the rest.


==See Also==
==See Also==
[[Stats List]]
*[[Stats List]]
*[[GetActorValue]]
*[[GetBaseActorValue]]
*[[ModActorValue]]
*[[ForceActorValue]]


[[GetActorValue]]
[[ModActorValue]]


[[Category: Functions]]
[[Category: Functions]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category:Actor Functions]]
[[Category:Actor Functions (CS 1.0)]]
[[Category: Actor Value Functions]]
[[Category: Actor Value Functions (CS 1.0)]]
[[Category: Statistics Functions]]
[[Category: Statistics Functions]]
[[Category: Statistics Functions (CS 1.0)]]
<!-- Begin Search Terms
Set
ACtor
Value
End Search Terms -->

Latest revision as of 12:38, 20 June 2008

Syntax:

SetActorValue StatName value
SetAV StatName value

Example:

SetActorValue Strength 60
Player.SetActorValue Alteration 50 

SetActorValue sets the stat's base value to the new value.

Notes[edit | edit source]

  • Although called on a reference, this function actually changes the value on the base actor (thus the base value on all references of that base actor). Note also that ModActorValue modifies the stat value only on the reference, and so is usually preferable.
  • For the player, this will not modify base health. Base health is determined by (Endurance * fPCBaseHealthMult). For example, a level 2 player with 40 Endurance will have 80 base health (40 * 2 = 80) and 4 more health (from the Endurance level bonus). If you use player.SetAv Health 100 the player will have 180 total health - 80 from base health, and 100 for the rest.

See Also[edit | edit source]