GetContainer - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

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

Syntax

ObjectReference Function GetContainer() native

Parameters

None.

Return Value

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

Examples

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

See Also