This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.

GetFirstRefInCell

From the Oblivion ConstructionSet Wiki
Revision as of 07:50, 3 December 2011 by imported>QQuix (Recent (!?!) OBSE function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(reference:ref) GetFirstRefInCell cell:ref type:int cellDepth:int includeInactiveRefs:int

Works the same as GetFirstRef but takes an additional parameter specifying the cell to scan.

Use GetNextRef to iterate through the rest of the references in the cell.


Example

ref pDoor
...
set pDoor to GetFirstRefInCell AbandonedMine 24 
while (pDoor)
  ; do something with pDoor
  set pDoor to GetNextRef
loop

Scans the list of doors in the AbandonedMine cell.


Notes

  • If the specified cell is not loaded in memory:
  • Unloaded interior cells: this function will only return persistent references.
  • Unloaded exterior cells: this function will not return any reference.


See Also