Here is my code. What a horrible mess eh? Thanks everyone for the help.
Type listitem Field name$ Field dist# Field id End Type Type enemy Field mesh Field name$ Field id End Type For i = 1 To 50 e.enemy = New enemy e\mesh = CreateCube() e\id = i PositionEntity e\mesh,Rnd(-5000,5000),Rnd(-100,100),Rnd(-5000,5000) e\name = "Enemy" Next Repeat ...... For e.enemy = each enemy If EntityDistance(camera, e\mesh) < 1000 this.listitem = New listitem this\name$ = e\name this\dist = EntityDistance (camera,e\mesh) this\id = e\id ; addtolist(this.listitem) Delete this EndIf Next Flip Until KeyHit (1) End Function addtolist(this.listitem) Text 10,10,this\name+" - "+this\id+" - "+this\dist+Chr$(13) ;Text3D(font2,-500,0,this\name+" - "+this\id+" - "+this\dist,0) End Function