Editing
ModActorValue - Actor
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] '''Member of:''' [[Actor Script]] Modifies the specified actor value on the actor. == Syntax == <syntaxhighlight lang="papyrus"> Function ModActorValue(string asValueName, float afAmount) native Function ModAV(string asValueName, float afAmount) ModActorValue(asValueName, afAmount) EndFunction </syntaxhighlight> == Parameters == *asValueName: The name of the actor value to modify. [[Actor Value List]] *afAmount: How much to modify the value by. == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Modify the player's current health actor value by 10 Game.GetPlayer().ModActorValue("health", 10.0) </syntaxhighlight> <br/> <syntaxhighlight lang="papyrus"> ; Modify Jake's current health actor value by -5.0 Actor Jake= Jake_Alias.GetReference() as Actor Jake.ModAV("Health", -5.0) </syntaxhighlight> == Notes == *This function modifies the current value as opposed to the base value. *ModActorValue is distinct from DamageActorValue because it adjusts the maximum value for the AV, while DamageActorValue or RestoreActorValue only adjust the current value. For example, if an actor has 100 Health, ModActorValue by -10 will lower the health total to 90/90, whereas DamageActorValue by 10 will result in 90/100 Health. == See Also == *[[Actor Value List]] *[[Actor Script]] *[[DamageActorValue - Actor]] *[[ForceActorValue - Actor]] *[[GetActorValue - Actor]] *[[GetBaseActorValue - Actor]] *[[RestoreActorValue - Actor]] *[[SetActorValue - Actor]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values