There is an simple example in the ZIP file to illustrate the concept.
*EDIT*
Ah well, I guess I can paste it here so that you can get an idea before you download it.
sync on : sync rate 60 : backdrop on : autocam off
`File can only have references between 1 to 32,
reset reference "file", 1, 32, 0
`Obtain a new reference to the file and open it.
textfile = add reference("file")
open to read textfile, "TestRefTrack.txt"
`Read it.
read string textfile, textStr$
`Close the file and release the reference.
close file textfile
release reference "file", textfile
`Create the objects.
cubeleft = CreateCube(10)
position object cubeleft, -20, 0, 50
color object cubeleft, rgb(255, 255, 0)
sphere = CreateSphere(5)
position object sphere, 0, 0, 50
color object sphere, rgb(0, 255, 255)
cuberight = CreateCube(10)
position object cuberight, 20, 0, 50
color object cuberight, rgb(255, 0, 255)
do
text 10, 10, textStr$
sync
loop
`Delete the objects.
DeleteObject(cubeleft)
DeleteObject(cuberight)
DeleteObject(sphere)
function CreateCube(size as float)
ref = add reference("object");
if ref <> -1 then make object cube ref, size
endfunction ref
function CreateSphere(size as float)
ref = add reference("object");
if ref <> -1 then make object sphere ref, size
endfunction ref
function DeleteObject(obj as integer)
delete object obj
release reference "object", obj
endfunction
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.
http://www.badnose.com/