GetInGrid

From the Fallout3 GECK Wiki
Revision as of 13:19, 19 November 2014 by imported>Odessa (created. Source, NVSE whats_new and testing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Similar to GetInSameCell, but checks a grid of cells, making it useful for exteriors. Returns true (1) if the specified reference is within the grid of cells centered on the player, the size of which is specified by depth. Depth defaults to 0, a value of -1 will use the uGrids to load setting. Added by NVSE 4.6.

Syntax

[help]
(bool) GetInGrid Target:reference CellDepth:int IncludeTakenRefs:bool

Example

if GetInGrid SunnyREF, 1
   ; Sunny is in the same or a next cell to the player (depth 1 = 3x3 cell grid)

if GetInGrid SunnyREF, -1
   ; Sunny is within uGrid range of the player

See Also