GetTempEffects

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns a two-dimensional array_var containing all temporary effect-entries (i.e. with limited duration) currently active on the calling actor, and their attributes. The elements in the main array are sub-arrays. Each sub-array contains the attribute values of one effect-entry, and has a total of 6 elements, ordered as follows:

Index	Attribute
-----	---------
0	Parent Effect-Form (Object Effect/Actor Effect/Ingestible) : ref
1	Base Effect form : ref
2	Magnitude : float
3	Time Left : float
4	Effect "caster" (the actor who applied the effect) : ref
5	Duration : float

Syntax

[help]
(tempEffects:array_var) reference.GetTempEffects

Example

let aTempEffects := actorRef.GetTempEffects
let iIndex := 0
while iIndex < ar_Size aTempEffects
	let rParentEffect := aTempEffects[iIndex][0]
	let rBaseEffect := aTempEffects[iIndex][1]
	let fMagnitude := aTempEffects[iIndex][2]
	let fTimeLeft := aTempEffects[iIndex][3]
	let rCaster := aTempEffects[iIndex][4]
	let fDuration := aTempEffects[iIndex][5]
	let iIndex += 1
loop 

See Also