Difference between revisions of "ForceActorValue"
Jump to navigation
Jump to search
imported>PoHa! (copied info; removed incomplete tag; changed terminology) |
imported>Jduvall m (→See Also) |
||
Line 29: | Line 29: | ||
*[[GetActorValueInfo]] | *[[GetActorValueInfo]] | ||
*[[GetBaseActorValue]] | *[[GetBaseActorValue]] | ||
*[[GetPermanentActorValue]] | |||
*[[ModActorValue]] | *[[ModActorValue]] | ||
*[[RestoreActorValue]] | *[[RestoreActorValue]] |
Revision as of 16:18, 16 June 2009
Syntax:
[ActorID.]ForceActorValue StatName value [ActorID.]ForceAV StatName value
Example:
ForceActorValue Health 50
ForceActorValue modifies the current stat to the specified value (not to be confused with SetActorValue, which changes the BASE value of the stat). The equivalent of:
Short modParameter Set modParameter to ( 50 - GetActorValue Health ) ModActorValue Health, modParameter
Because the GetActorValue function returns the current state, including all effects, damage, and other ModActorValue numbers, ForceActorValue will produce different ModActorValue results at different times.
Note that like ModActorValue, when used in a script this change is permanent. See ModActorValue for discussion of how this works.
Notes
- Should never be used on the player, as it will seriously screw up that actor value when combined with other mods or scripts that adjust it or depend on it.
- Instead, use ModAV to adjust the stat to the required value. If several mods make changes to the same value at the same time, and one of them uses ForceAV the stat is likely to end up irrevocably altered. For example:
- An actor has a starting Strength of 6.
- Mod 1 records 6 as the starting strength, and uses ForceAV Strength 8 to increase their strength by 2.
- Mod 2 uses ModAV Strength 2 to further increase their strength by 2, to 10.
- Mod 1's effect ends, and it uses ForceAV Strength 6 to return the actor's strength to the recorded starting value of 6.
- Mod 2's effect ends, and it uses ModAV Strength -2 to remove the 2 strength it added. This gives a total value of 4.
- The actor now has Strength 4, and neither Mod 1 nor Mod 2 will fix it.
See Also
- Stats List
- GetActorValue
- GetActorValueInfo
- GetBaseActorValue
- GetPermanentActorValue
- ModActorValue
- RestoreActorValue
- SetActorValue