Mod:Lighthouse Papyrus Extender/ObjectReference

ObjectReference Functions
{| style="width:100%;"
 * valign="top" style="width: 85%;" |

GetAnimationLength

 * Returns the total length in seconds of the animation that's currently being played by

float Function GetAnimationLength(ObjectReference akRef) global native

GetAnimationTime

 * Returns the progress in seconds of the animation that's currently being played by

float Function GetAnimationTime(ObjectReference akRef) global native

GetClosestActorFromRef

 * Returns the closest Actor from ; with optional parameters to ingnore the Player or include dead NPCs

Actor Function GetClosestActorFromRef(ObjectReference akRef, bool abIgnorePlayer, bool abIncludeDead) global native

GetDoorDestination

 * Returns the ObjectReference that is linked to the  door ref

ObjectReference Function GetDoorDestination(ObjectReference akRef) global native


 * Credit: powerofthree

GetInventoryItemsAsArray

 * Returns a Form array with the items that  holds which match the enabled filters via  ; with the option to require the items to match all   filters if   is enabled
 * Passing everything as  will return all inventory items. Additionally, the size of the passed array doesn't matter; having just 1   element is enough to return all items or all equipped items if it's
 * As new filters get added, scripts written on older versions should continue to work fine as long as the size of  wasn't greater than the amount of filters available at the time. Otherwise new filters will be unintentionally applied by the function, which may make the function misbehave
 * The code below can be pasted into your scripts to easily create the array with the current supported filters

bool[] filterArray = new bool[5] filterArray[0] = false ; equipped items filterArray[1] = false ; favourited items filterArray[2] = false ; legendary items filterArray[3] = false ; quest items filterArray[4] = false ; multiple items

Form[] Function GetInventoryItemsAsArray(ObjectReference akRef, bool[] akFilterArray, bool abMatchAll) global native

IsInWater

 * Returns whether the ObjectReference  is in water

bool Function IsInWater(ObjectReference akRef) global native

SetDoorDestination

 * Sets  as the new linked ObjectReference for the   door ref

bool Function SetDoorDestination(ObjectReference akRef, ObjectReference akDestinationRef) global native


 * Credit: powerofthree

SetHealthPercent

 * Sets the Health percent of
 * 1.0 is equivalent to 100%

Function SetHealthPercent(ObjectReference akRef, float afHealthPercent) global native


 * valign="top" style="width: 15%;"|


 * }