GetInGrid

From GECK
Jump to: navigation, search

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 uGridsToLoad 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

Notes

  • This function works when checking if a reference is in a interior cell.

See Also