Difference between revisions of "GetActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
imported>Moorleiche2k
Line 7: Line 7:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
float Function GetActorValue(string asValueName) native
float Function GetActorValue(string asValueName) native ;seems no longer to work, at least for "magicka"
float Function GetAV(string asValueName)
float Function GetAV(string asValueName) ;seems to be native by now and works with "magicka"
</source>
</source>



Revision as of 17:07, 20 June 2012

Member of: Actor Script

Gets the specified actor value from the actor.

Syntax

float Function GetActorValue(string asValueName) native ;seems no longer to work, at least for "magicka"
float Function GetAV(string asValueName) ;seems to be native by now and works with "magicka"

Parameters

Return Value

The value of the requested actor value.

Examples

; Obtain the player's current health actor value
int playersHealth = Game.GetPlayer().GetActorValue("health") as int


; Obtain Bob's current health actor value
int bobsHealth = Bob.GetAV("Health") as int

See Also