MAX_RANGE is from your code, is 1000.
DynLoadSprite is something I've been using long so I just keept using it. Didn't know there was anything in the entity layer that could do it, thanks for the tip :-)
Ok, this is the complete (cut off the 2D unimportant stuff and actually tested the project :-)
// --------------------------------- //
// Project: Help-Forum
// Start: Sunday, February 08, 2009
// IDE Version: 6.156
Init3d()
END
TYPE OBJECT // The 3D objects
obj // Object ID
x; y; z // Position
dx; dy; dz // delta for movement
rx; ry; rz // rotation
ENDTYPE
GLOBAL MAX_RANGE = 1000
GLOBAL camera[] AS OBJECT
FUNCTION Init3d:
LOCAL cam AS OBJECT
RESTORE cameras
FOR n = 0 TO 4
READ cam.x, cam.y, cam.z
READ cam.rx, cam.ry, cam.rz
cam.obj = EntityCreateCamera()
EntitySetCameraRange(cam.obj, 1, MAX_RANGE)
EntitySetPosition(cam.obj, cam.x, cam.y, cam.z)
EntitySetRotation(cam.obj, cam.rx, cam.ry, cam.rz)
DIMPUSH camera[], cam // Add the camera to the array of cams
DEBUG "obj:"+camera[n].obj+"\n"
NEXT
active_cam = 4 // The last added camera is the active camera
light = EntityCreateLight(RGB(255,255,255))
EntityMove(light, -150, 150, 150)
ENDFUNCTION
STARTDATA cameras:
DATA 35, 70, 150 // Position of camera 0
DATA 25, 180, 0 // rotation
DATA 35, 70, -150 // Position of camera 1
DATA 25, 0, 0 // rotation
DATA 35, 70, 150 // Position of camera 2
DATA 25, 180, 0 // rotation
DATA 35, 70, 150 // Position of camera 3
DATA 25, 180, 0 // rotation
DATA 35, 70, 150 // Position of camera 4
DATA 25, 180, 0 // rotation
ENDDATA
Edit: EntityLoadTexture() is not doing what I want it to do, it doesn't load animations... and since sprites and animations share the index I have to write my own routine to load animations anyway.