IsInInterior - ObjectReference

Revision as of 19:33, 9 December 2014 by imported>Terra Nova2 (Made note a little more clearer.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ObjectReference Script

Checks to see if this object is in an interior cell.

SyntaxEdit

bool Function IsInInterior()
  Cell parentCell = GetParentCell()
  Return parentCell && parentCell.IsInterior()
EndFunction

ParametersEdit

None

Return ValueEdit

Returns true if the object is in an interior cell.

ExamplesEdit

; Is the box in an interior?
if Box.IsInInterior()
  Debug.Trace("Box is inside!")
endIf

NotesEdit

  • This function will return false for the various interior cells in certain worldspaces due to those being classified by the game engine as being exteriors. See talk page for workaround.

See AlsoEdit