Better to use arrays for this:
Then, to position a track piece later in the game
Just to clarify things a little more:
mycube=CreateCube()
The 'mycube' bit is a handle which points to where that newly created cube lives in memory.
Dim track(10) For t=1 to 10 track(t)=CreateCube() Next
Then, to position a track piece later in the game
; position track number 3 PositionEntity track(3),x,y,z
Just to clarify things a little more:
mycube=CreateCube()
The 'mycube' bit is a handle which points to where that newly created cube lives in memory.