Description
Wiki Description
Sets the base value specified actor value on the actor to the passed-in value. Any modifiers are left intact.
Documentation Comment
Sets the specified actor value
Caveats
CK Wiki - Notes
- While GetActorValue returns the current value, SetActorValue sets the base value. To modify the current value, use Actor.DamageActorValue(...), Actor.RestoreActorValue(...), Actor.ModActorValue(...), or Actor.ForceActorValue(...).
Parameters
stringasValueName
CK Wiki Description
The name of the actor value to set the value of. Actor Value List
floatafValue
CK Wiki Description
What value to set the actor value to.
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)Auto-Generated Example
string myString__asValueName
float myFloat__afValue
myActor__toCallFunctionOn.SetActorValue(myString__asValueName, myFloat__afValue)Related Pages
- Actor Value List
- Actor
- Actor.GetActorValue(...)
- Actor.DamageActorValue(...)
- Actor.ForceActorValue(...)
- Actor.GetBaseActorValue(...)
- Actor.ModActorValue(...)
- Actor.RestoreActorValue(...)
