Type alien Field x,y Global alienList:TList Function Create() If alienList=Null Then alienList=CreateList() a:alien=New alien alienList.AddLast(a) a.x=Rand(0,640) a.y=Rand(0,480) Return a End Function End Type
Basically, have the global within the Type and check whether it's null or not when creating a new type.