Difference between revisions of "DamageActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
imported>JustinOther
m (→‎Examples: Floatified afDamage)
Line 21: Line 21:
<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>



Revision as of 13:08, 8 October 2012

Member of: Actor Script

Applies damage to the specified actor value on this actor.

Syntax

Function DamageActorValue(string asValueName, float afDamage) native
Function DamageAV(string asValueName, float afDamage)

Parameters

  • 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

None.

Examples

; 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)

See Also