GetActorValueMax - Actor: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Jlundin
(Created page with "Category:Scripting Category:Papyrus '''Member of:''' Actor Script ''(Requires SSE 1.5.3)'' Obtains the actor value's current maximum (taking into account buffs an...")
 
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
float Function GetActorValueMax(string asValueName) native
float Function GetActorValueMax(string asValueName) native
float Function GetAVMax(string asValueName)
float Function GetAVMax(string asValueName)
   return GetActorValueMax(asValueName)
   return GetActorValueMax(asValueName)
EndFunction
EndFunction
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 20: Line 20:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Obtain the player's current health maximum value
; Obtain the player's current health maximum value
float playersHealth = Game.GetPlayer().GetActorValueMax("health")
float playersHealth = Game.GetPlayer().GetActorValueMax("health")
Line 26: Line 26:
   Debug.Trace("The player has buffed their health at least once - or is under some effect buffing health")
   Debug.Trace("The player has buffed their health at least once - or is under some effect buffing health")
endIf
endIf
</source>
</syntaxhighlight>
<br/>
<br/>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Obtain Bob's current maximum health actor value
; Obtain Bob's current maximum health actor value
float bobsHealth = Bob.GetAVMax("Health")
float bobsHealth = Bob.GetAVMax("Health")
Line 34: Line 34:
   Debug.Trace("Bob is unlikely to live very long")
   Debug.Trace("Bob is unlikely to live very long")
endIf
endIf
</source>
</syntaxhighlight>


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

Navigation menu