GetTempEffects

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

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 5 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

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 iIndex += 1
loop

See Also