Difference between revisions of "DamageActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Thingy Person
imported>KainXavier
m (Removed second bullet in Notes section due to inaccuracy of statement.)
 
Line 34: Line 34:
== Notes ==
== Notes ==
*This function modifies the current value as opposed to the base value.
*This function modifies the current value as opposed to the base value.
*DamageActorValue() is equivalent to ModActorValue() with a negative number.
*Negative numbers will be converted to positive so -100 and 100 will have the same effect.
*Negative numbers will be converted to positive so -100 and 100 will have the same effect.



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.

See Also[edit | edit source]