Difference between revisions of "SetNthEffectMagnitude - Potion"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Notanon
(Documentation was very wrong - wrong function name, wrong return value, wrong number of parameters, and wrong names of parameters.)
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 ==
Line 19: Line 20:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
float magnitude = potion.SetNthEffectMagnitude(0)
float magnitude = potion.SetNthEffectMagnitude(0, 20)
Debug.Trace("Potions first effect has been set to a magnitude of " + magnitude)
</source>
</source>


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

Revision as of 00:06, 2 December 2021

SKSE Member of: Potion Script

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

Syntax

Function SetNthEffectMagnitude(int index, float value) native

Parameters

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

Set Value

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

Examples

float magnitude = potion.SetNthEffectMagnitude(0, 20)

See Also