AdvanceSeed

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

If a seed has been set for the calling mod, advances that seed's internal numGenerated count by numIncrement. This will make in the next call(s) of RandSeeded/GetRandomPercentSeeded generate the next number(s) in the pseudo-random sequence.

Effectively, this discards what would have been returned by X amount of RandSeeded/GetRandomPercentSeeded calls.

This function returns 0 (false) if no seed has been set for the calling mod, 1 (true) otherwise.

Syntax

[help]
(wasAdvanced:bool) AdvanceSeed numIncrement:UInt

Example

 int iRand
 SetRandomizerSeed 101
 AdvanceSeed 5  ;generates the first 5 numbers in the sequence and discards them.
 let iRand := SeedRanded 1, 100  ;generates the 6th number of the sequence and stores it.

See Also