A function added by MWSE.
xFirstItem returns a reference like xFirstNPC except this one is the top of a list of all objects in a cell.
In v0.9.4a this function is bugged: it may not return all references in exterior cells, and it returns deleted references. These bugs are fixed in the MWSE update released by Merzasphor.
Beware, the list still has a serious limitation that it may not include save game objects added to the cell [ as of the 0.9.5-alpha.20151016 release ].
SyntaxEdit
reference (long): xFirstItem
ExampleEdit
long ItemRef ifx ( itemref ) setx itemref to xNextRef itemref else setx itemref to xFirstitem ; get first "reference" endif if ( itemref == 0 ) messagebox "end" ; end of list endif