Difference between revisions of "ForceActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
m (→‎Examples: Floatified afNewValue)
imported>Selyb
m (Added a note.)
Line 28: Line 28:
Jake.ForceAV("Health", 10.0)
Jake.ForceAV("Health", 10.0)
</source>
</source>
== Notes ==
*This function modifies the current value as opposed to the base value. To set the base value see [[SetActorValue - Actor]]


== See Also ==
== See Also ==

Revision as of 03:04, 6 February 2013

Member of: Actor Script

Forces the specified actor value to the passed-in value.

Syntax

Function ForceActorValue(string asValueName, float afNewValue) native
Function ForceAV(string asValueName, float afNewValue)

Parameters

  • asValueName: The name of the actor value to force. Actor Value List
  • afNewValue: The new value to force the actor value to.

Return Value

None.

Examples

; Force the player's health to 50
Game.GetPlayer().ForceActorValue("health", 50.0)


; Force Jake's health to 10
Jake.ForceAV("Health", 10.0)

Notes

  • This function modifies the current value as opposed to the base value. To set the base value see SetActorValue - Actor

See Also