Difference between revisions of "SetActorValue - Actor"
Jump to navigation
Jump to search
imported>JustinOther m (→Examples: Floatified parameters) |
imported>Selyb m |
||
Line 28: | Line 28: | ||
Nancy.SetAV("Health", 20.0) | Nancy.SetAV("Health", 20.0) | ||
</source> | </source> | ||
== Notes == | |||
*While GetActorValue returns the current value, SetActorValue sets the base value. To modify the current value, use [[DamageActorValue - Actor]], [[RestoreActorValue - Actor]], [[ModActorValue - Actor]], or [[ForceActorValue - Actor]]. | |||
== See Also == | == See Also == |
Revision as of 03:11, 6 February 2013
Member of: Actor Script
Sets the base value specified actor value on the actor to the passed-in value. Any modifiers are left intact.
Syntax
Function SetActorValue(string asValueName, float afValue) native
Function SetAV(string asValueName, float afValue)
Parameters
- asValueName: The name of the actor value to set the value of. Actor Value List
- afValue: What value to set the actor value to.
Return Value
None.
Examples
; Set the player's health actor value to 50
Game.GetPlayer().SetActorValue("health", 50.0)
; Set Nancy's current health actor value
Nancy.SetAV("Health", 20.0)
Notes
- While GetActorValue returns the current value, SetActorValue sets the base value. To modify the current value, use DamageActorValue - Actor, RestoreActorValue - Actor, ModActorValue - Actor, or ForceActorValue - Actor.