Difference between revisions of "ModActorValue - Actor"
Jump to navigation
Jump to search
imported>Selyb m (Added some notes.) |
imported>Griffinsclaw |
||
Line 32: | Line 32: | ||
== 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. | ||
*ModActorValue() with a negative number is equivalent to DamageActorValue() | *ModActorValue() with a negative number is equivalent to DamageActorValue() (not always true, see talk) | ||
*ModActorValue() with a positive number is equivalent to RestoreActorValue() except that RestoreActorValue will not set the current value higher than the base value. | *ModActorValue() with a positive number is equivalent to RestoreActorValue() except that RestoreActorValue will not set the current value higher than the base value. | ||
Revision as of 09:01, 20 February 2013
Member of: Actor Script
Modifies the specified actor value on the actor.
Syntax
Function ModActorValue(string asValueName, float afAmount) native
Function ModAV(string asValueName, float afAmount)
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
; Modify the player's current health actor value by 10
Game.GetPlayer().ModActorValue("health", 10.0)
; Modify Jake's current health actor value by -5.0
Actor Jake= Jake_Alias.GetReference() as Actor
Jake.ModAV("Health", -5.0)
Notes
- This function modifies the current value as opposed to the base value.
- ModActorValue() with a negative number is equivalent to DamageActorValue() (not always true, see talk)
- ModActorValue() with a positive number is equivalent to RestoreActorValue() except that RestoreActorValue will not set the current value higher than the base value.