Difference between revisions of "GetFirstRef"

Jump to navigation Jump to search
7 bytes added ,  07:01, 17 July 2014
m
minor
imported>Odessa
(added note)
imported>Odessa
m (minor)
Line 1: Line 1:
{{Function
{{Function
  |origin = FOSE1
  |origin = FOSE1
  |summary = Returns the first reference in the player's current cell. A type can optionally be supplied by its [[Form Type IDs|ID code]] to return only references matching that type. For example, you can pass 200 for actors and 201 for inventory items. Returns nothing (zero) if there is no ref matching the type in the cell. This function will normally be used only within a loop with [[GetNextRef]] to scan actors in a cell.
  |summary = Returns the first reference in the player's current cell. A type can optionally be supplied by its [[Form Type IDs|ID code]] to return only references matching that type. For example, you can pass 200 for actors and 201 for inventory items. Returns nothing (zero) if there is no ref matching the type in the cell. This function will normally be used only prior to a loop including [[GetNextRef]] to scan actors in a cell.


An optional cell depth can be supplied to specify the number of adjacent cells to scan in exteriors: a cell depth of 1 scans the player's current cell plus 8 adjacent cells, a depth of 2 scans the player's cell plus 25 adjacent cells.
An optional cell depth can be supplied to specify the number of adjacent cells to scan in exteriors: a cell depth of 1 scans the player's current cell plus 8 adjacent cells, a depth of 2 scans the player's cell plus 25 adjacent cells.
Anonymous user

Navigation menu