Difference between revisions of "GetFirstRefInCell"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(changing to Function template)
imported>QQuix
m (Fixed OBSE version))
 
Line 33: Line 33:
   | CategoryList = [[Category:Functions]]
   | CategoryList = [[Category:Functions]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0013)]]
[[Category:Functions (OBSE v0016)]]
[[Category:Record Variable Functions]]
[[Category:Record Variable Functions]]
[[Category:Record Variable Functions (OBSE)]]
[[Category:Record Variable Functions (OBSE)]]

Latest revision as of 14:05, 8 June 2012

< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

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

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.
  • Ckeck the GetFirstRef article for additional details

See Also