Background for Fallout 4
Member of the ObjectReference script
floatfunctionGetValuePercentage(ActorValueakAV)Native

Description

Wiki Description

Gets the specified actor value from the actor as a percentage of its maximum value (from 0 to 1).

Documentation Comment

Gets the specified actor value as a percentage of its max value - from 0 to 1


Caveats


Parameters

ActorValueakAV

CK Wiki Description

The Actor Value to get the value of. Actor Value


Examples

ActorValue property HealthAV
; Obtain the player's current health percentage value
float playersHealth = Game.GetPlayer().GetValuePercentage(HealthAV)
if (playersHealth > 0.5)
  Debug.Trace("The player has over half their health left")
endIf
ActorValue property HealthAV
; Obtain Bob's current health actor value
float bobsHealth = Bob.GetValuePercentage(HealthAV)
if (bobsHealth < 0.1)
  Debug.Trace("Bob has less then 10% health remaining")
endIf

Auto-Generated Example

ActorValue myActorValue__akAV

float returnedValue = myObjectReference__toCallFunctionOn.GetValuePercentage(myActorValue__akAV)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.