ModNthTempEffectTimeLeft
From GECK
A function added by the JohnnyGuitar NVSE Plugin.
Contents
Description
Modifies the time left of Nth temporary effect-entry of the calling actor. GetTempEffects should be called before calling this function, and on the same frame, in order to determine the index of the effect-entry to be modified.
Syntax
(success:0/1) reference.ModNthTempEffectTimeLeft index:int modifier:float
Example
actorRef.ModNthTempEffectTimeLeft 2 -5 ; decreases the time left for the effect to run by 5
Notes
- Internally the function modifies "time elapsed" variable, which counts from 0 to the effect's duration. This means that you can't change the time left by a value bigger than the current time elapsed, or it would go into negatives and cause undefined behavior. Consider this example:
; timeElapsed 0, duration 240 actorRef.ModNthTempEffectTimeLeft 0 100 ; timeElapsed -100, duration 240