GetContainer - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Returns the container this reference is in, if any. (Returns None if not in a container)

Syntax[edit | edit source]

ObjectReference Function GetContainer() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

The container this reference is in, or None if not in a container

Examples[edit | edit source]

if (GetContainer() == Game.GetPlayer())
  Debug.Trace("We're what the player has in his pocketses...")
endIf

See Also[edit | edit source]