Acces entity with name ?

Blitz3D Forums/Blitz3D Programming/Acces entity with name ?

Hi :)

I have try to make this function to acces directly an entity
with a name :

Type Obj
Field Name$
Field Entity
Field Px#
Field Py#
Field Pz#
End Type

Graphics3D 640,480,32,2

Cam=CreateCamera()
PositionEntity Cam,0,0,-10

Light=CreateLight(2)
PositionEntity light ,-20,-20,0

N.Obj=New Obj
N\Name$="TOTO"
N\Entity=CreateCube()
NameEntity N\Entity,Handle(N)
N\Px#=0
N\Py#=0
N\Pz#=0

PositionEntity N\Entity,N\Px#,N\Py#,N\Pz#


While Not KeyDown(1)
Turn("TOTO")
UpdateWorld
RenderWorld

Flip
Wend

Function Turn(Name$)
For N.Obj=Each Obj
If N\name$=name$ Then
TurnEntity N\Entity,1,1,1
EndIf
Next
End Function

But ... It is possible to accelerate the name search
directly with handle or object function ????