Background for Starfield
Member of the ObjectReference script
intfunctionIncrementLoopingValue(ActorValueakAV, intaiMaxValue, intaiIncrementAmount=1)

Description

Documentation Comment

jduvall - convenience function
Increments an actorvalue, and rolls it over to 0 if incremented value would exceed aiMaxValue
sets and returns (GetValueInt(akAV) + aiIncrementAmount) % (aiMaxValue + 1)


Caveats


Parameters

ActorValueakAV

intaiMaxValue

intaiIncrementAmount=1


Examples

Auto-Generated Example

ActorValue myActorValue__akAV
int myInt__aiMaxValue
int myInt__aiIncrementAmount

int returnedValue = myObjectReference__toCallFunctionOn.IncrementLoopingValue(myActorValue__akAV, myInt__aiMaxValue, myInt__aiIncrementAmount)
Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.