Difference between revisions of "SetNthEffectMagnitude - Potion"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Notanon
(→‎Examples: Missed something attempting to assign a return value from the function that doesn't return a value)
 
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
float Function GetNthEffectMagnitude(int n) native
Function SetNthEffectMagnitude(int index, float value) native
</source>
</source>


== Parameters ==
== Parameters ==
*n: The index of which effect magnitude will be set.
* index: The index of which effect magnitude will be set.
* value: The new magnitude value.


== Set Value ==
== Set Value ==
Sets the magnitude of the Nth effect attached to this enchantment, ingredient, potion, or spell.
Sets the magnitude of the Nth effect attached to this potion.


== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
float magnitude = enchantment.SetNthEffectMagnitude(0)
potion.SetNthEffectMagnitude(0, 20)
Debug.Trace("Enchantments first effect has been set to a magnitude of " + magnitude)
</source>
</source>


== See Also ==
== See Also ==
*[[Potion Script]]
*[[Potion Script]]

Latest revision as of 23:06, 1 December 2021

SKSE Member of: Potion Script

Sets the magnitude of the Nth effect attached to this potion. (This function requires SKSE)

Syntax[edit | edit source]

Function SetNthEffectMagnitude(int index, float value) native

Parameters[edit | edit source]

  • index: The index of which effect magnitude will be set.
  • value: The new magnitude value.

Set Value[edit | edit source]

Sets the magnitude of the Nth effect attached to this potion.

Examples[edit | edit source]

potion.SetNthEffectMagnitude(0, 20)

See Also[edit | edit source]