Difference between revisions of "DamageActorValue - Actor"

234 bytes added ,  23:18, 10 April 2014
m
Removed second bullet in Notes section due to inaccuracy of statement.
imported>Jlundin
 
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("health", 10)
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() as Actor
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 ==
Anonymous user