Sorry for the double post, but i've been playing around with it for a few hours now. And i've got to say, this really helps programming stuff!
Look here, I made two classes, one for any object I could use in my program. And another for level 'meshes' which automatically do have collision on it using sparky's collision dll. They check automatically between themselves and the other 'object' class.
Here is the code of it without the classes:
REM Project: Classes
REM Created: 12-3-2007 22:07:11
REM
REM ***** Main Source File *****
sync on
sync rate 60
autocam off
object as oop_object
object = oop_object.new("dbcube")
set shadow shading on oop_object.RET_objnr(object)
level as oop_levelobject
level = oop_levelobject.new("3D/TestGround/TestGround2.x")
do
sync
`Get the object number of 'object' and look at it
tempobj = oop_object.RET_objnr(object)
X# = object position x(tempobj)
Y# = object position y(tempobj)
Z# = object position z(tempobj)
position camera 0,200,0
point camera X#,Y#,Z#
`move the object 'object' around
if upkey()=1 then oop_object.setforce( object,0,0,3)
if downkey()=1 then oop_object.setforce( object,0,0,-3)
if rightkey()=1 then oop_object.setforce( object,3,0,0)
if leftkey()=1 then oop_object.setforce( object,-3,0,0)
`ONE update function including it all ^
`SYNTAX object,sliding,gravity#,collision,levelobj,debuginfo
oop_object.update_oop( object,0,-0.2,1,oop_levelobject.RET_objnr(level),1)
loop
And here is a video of what I got with it:
http://forumfiles.thegamecreators.com/?i=1141638
THANKS again for your awesome pre-compiler