Difference between revisions of "GetActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Thingy Person
imported>DavidJCobb
m (→‎Notes: those are the same thing)
 
(One intermediate revision by one other user not shown)
Line 32: Line 32:
== Notes ==
== Notes ==
*GetActorValue is slightly faster than GetAV as it is native.
*GetActorValue is slightly faster than GetAV as it is native.
*This function returns the current value as opposed to the base value. To get the base value see [[GetBaseActorValue - Actor]].
*This function returns the current value as opposed to the base (maximum) value. To get the base value see [[GetBaseActorValue - Actor]].
*[[GetBaseActorValue - Actor]] returns the possible max value of a stat BEFORE buffs. To get the player's current percent of a stat after buffs (with examples how to get the max buffed value or a percent of the max buffed value of a stat as well), see [[GetActorValuePercentage - Actor]]


== See Also ==
== See Also ==

Latest revision as of 14:09, 21 June 2018

Member of: Actor Script

Gets the specified actor value from the actor.

Syntax[edit | edit source]

float Function GetActorValue(string asValueName) native
float Function GetAV(string asValueName)
  return GetActorValue(asValueName)
EndFunction

Parameters[edit | edit source]

Return Value[edit | edit source]

The value of the requested actor value.

Examples[edit | edit source]

; Obtain the player's current health actor value
Float fPlayerHealth = Game.GetPlayer().GetActorValue("Health")


; Obtain Bob's current Sneak actor value
Float fBobSneak = Bob.GetAV("Sneak")

Notes[edit | edit source]

  • GetActorValue is slightly faster than GetAV as it is native.
  • This function returns the current value as opposed to the base (maximum) value. To get the base value see GetBaseActorValue - Actor.

See Also[edit | edit source]