Difference between revisions of "DamageActorValue - Actor"
Jump to navigation
Jump to search
imported>Jlundin (→Syntax) |
imported>KainXavier m (Removed second bullet in Notes section due to inaccuracy of statement.) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 9: | Line 9: | ||
Function DamageActorValue(string asValueName, float afDamage) native | Function DamageActorValue(string asValueName, float afDamage) native | ||
Function DamageAV(string asValueName, float afDamage) | Function DamageAV(string asValueName, float afDamage) | ||
DamageActorValue(asValueName, afDamage) | |||
EndFunction | |||
</source> | </source> | ||
Line 21: | Line 23: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Damage the player's health 10 points | ; Damage the player's health 10 points | ||
Game.GetPlayer().DamageActorValue(" | Game.GetPlayer().DamageActorValue("Health", 10.0) | ||
</source> | </source> | ||
<br/> | <br/> | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Damage Bob's health 5 points | ; Damage Bob's health 5 points | ||
Actor Bob = Bob_Alias.GetReference() | Actor Bob = Bob_Alias.GetReference() As Actor | ||
Bob.DamageAV("Health", 5) | Bob.DamageAV("Health", 5.0) | ||
</source> | </source> | ||
== Notes == | |||
*This function modifies the current value as opposed to the base value. | |||
*Negative numbers will be converted to positive so -100 and 100 will have the same effect. | |||
== See Also == | == See Also == |
Latest revision as of 22:18, 10 April 2014
Member of: Actor Script
Applies damage to the specified actor value on this actor.
Syntax[edit | edit source]
Function DamageActorValue(string asValueName, float afDamage) native
Function DamageAV(string asValueName, float afDamage)
DamageActorValue(asValueName, afDamage)
EndFunction
Parameters[edit | edit source]
- asValueName: The name of the actor value to damage. Actor Value List
- afDamage: The amount of damage to apply to the actor value.
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Damage the player's health 10 points
Game.GetPlayer().DamageActorValue("Health", 10.0)
; Damage Bob's health 5 points
Actor Bob = Bob_Alias.GetReference() As Actor
Bob.DamageAV("Health", 5.0)
Notes[edit | edit source]
- This function modifies the current value as opposed to the base value.
- Negative numbers will be converted to positive so -100 and 100 will have the same effect.