Description
Wiki Description
Forces the specified actor value to the passed-in value.
Documentation Comment
Force the specified actor value to a specified value
Caveats
CK Wiki - Notes
- This function modifies the current value as opposed to the base value. To set the base value, see Actor.SetActorValue(...).
- To elaborate on that a bit, this function modifies the "permanent modifier" described in the Actor Value documentation, and that affects how the current value is computed. If an actor has a base health of 125 and you force their health to 0, then the permanent modifier will be set to -125, and their current health will become 0. If you then set the base health to 150, they will still have a permanent modifier of -125, so their current health will instantly become 25 (150 - 125).
Parameters
stringasValueName
CK Wiki Description
The name of the actor value to force. Actor Value List
floatafNewValue
CK Wiki Description
The new value to force the actor value to.
Examples
No human-generated examples found for this function.
Auto-Generated Example
string myString__asValueName
float myFloat__afNewValue
myActor__toCallFunctionOn.ForceActorValue(myString__asValueName, myFloat__afNewValue)Related Pages
- Actor Value List
- Actor
- Actor.DamageActorValue(...)
- Actor.GetActorValue(...)
- Actor.GetBaseActorValue(...)
- Actor.ModActorValue(...)
- Actor.RestoreActorValue(...)
- Actor.SetActorValue(...)
