Difference between revisions of "GetFirstRefInCell"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>QQuix
(Recent (!?!) OBSE function)
 
imported>DragoonWraith
(changing to Function template)
Line 1: Line 1:
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]]
{{Function
 
  | origin = OBSE
'''Syntax:'''
  | summary = Works the same as [[GetFirstRef]] but takes an additional parameter specifying the cell to scan.  
(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.
Use [[GetNextRef]] to iterate through the rest of the references in the cell.
 
  | returnVal = reference
 
  | returnType = ref
'''Example'''
  | arguments =
<pre>ref pDoor
  {{FunctionArgument
    | name = cell
    | type = ref
  }}{{FunctionArgument
    | name = type
    | type = int
    | optional = y
  }}{{FunctionArgument
    | name = cellDepth
    | type = int
    | optional = y
  }}{{FunctionArgument
    | name = includeInactiveRefs
    | type = bool
    | optional = y
  }}
  | example = <pre>ref pDoor
...
...
set pDoor to GetFirstRefInCell AbandonedMine 24  
set pDoor to GetFirstRefInCell AbandonedMine 24  
Line 18: Line 31:
loop</pre>
loop</pre>
Scans the list of doors in the AbandonedMine cell.
Scans the list of doors in the AbandonedMine cell.
 
  | CategoryList = [[Category:Functions]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0013)]]
[[Category:Record Variable Functions]]
[[Category:Record Variable Functions (OBSE)]]
}}


==Notes==
==Notes==
*If the specified cell is not loaded in memory:
*If the specified cell is not loaded in memory:
:*Unloaded interior cells: this function will only return persistent references.
**Unloaded interior cells: this function will only return persistent references.
:*Unloaded exterior cells: this function will not return any reference.
**Unloaded exterior cells: this function will not return any reference.
 
*Ckeck the [[GetFirstRef]] article for additional details
*Ckeck the [[GetFirstRef]] article for additional details


==See Also==
==See Also==
Line 35: Line 50:
*[[HasBeenPickedUp]]
*[[HasBeenPickedUp]]
*[[GetObjectType]]
*[[GetObjectType]]
[[Category:Functions]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0013)]]
[[Category: Record Variable Functions]]
[[Category: Record Variable Functions (OBSE)]]

Revision as of 13:42, 3 December 2011

< [[::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