When I run the following code my game runs through the loading screen then closes without any error message. I'm using the newest version of NGC. Loads fine when I take out the TREE collision. PONE/WORLD1 collision is working. But when I add the TREE one it crashes my game.
Anything wrong with the code here? ...oh and I have DBP fully updated.
set display mode 800,600,32
sync on
sync
sync rate 45
set cursor 400,300
print "Loading"
sync
#Constant NCULL_COUNTER_CLOCK 1
#Constant NCULL_CLOCK 2
#Constant NCULL_NONE 3
#Constant TYPE_NGC_ELLIP=1
#Constant TYPE_NGC_MESH=2
#Constant ELLIP_2_ELLIP=1
#Constant ELLIP_2_POLY=2
#Constant RESP_STICK=1
#Constant RESP_SLIDE=2
#Constant RESP_SLIDE_NO_SLOPES=3
#Constant RESP_SLIDE_NO_GRAV=4
#Constant RESP_SLIDE_NO_ACCEL=5
#Constant RESP_NONE=6
#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_NOTURN=3
StartCollisionPRO(000000000,000000000,000000000)
StartCollisionDebugPRO()
SetCollisionExclusive( 1 )
#constant PONE = 1
#constant WORLD1 = 2
#constant TREE = 3
SetCollisionsPRO(PONE, WORLD1, ELLIP_2_POLY, RESP_SLIDE, DYN_RESP,0)
SetCollisionsPRO(PONE, TREE, ELLIP_2_POLY, RESP_SLIDE, DYN_RESP,0)
load object "skya.x",3
PositionObjectPRO(3,0,0,0)
make object cube 2,24
PositionObjectPRO(2,20,17,45)
CollisionTypePRO(2, PONE)
SetObjRadiusPRO( 2, 25, 25, 25 )
load object "abc.x",1
CollisionTypePRO(1, WORLD1)
load object "tree.x",4
PositionObjectPRO(4,400,0,400)
CollisionTypePRO(4, TREE)
set camera range 10,10000
do
text 10,10,"Screen FPS:"+str$(screen fps())
text 10,30,"X: "+str$(object position x(2))
text 10,50,"Y: "+str$(object position y(2))
text 10,70,"Z: "+str$(object position z(2))
if upkey()=1 then moveobjectPRO(2,5)
if downkey()=1 then moveobjectPRO( 2,-5)
if leftkey()=1 then YRotateObjectPRO(2,wrapvalue(object angle y(2)-5))
if rightkey()=1 then YRotateObjectPRO(2,wrapvalue(object angle y(2)+5))
SET CAMERA TO FOLLOW playerx,playery,playerz,object angle y(2),70,25,50,0
RunCollisionPRO()
playerx=object position x(2)
playery=object position y(2)
playerz=object position z(2)
position object 2,playerx,17,playerz
sync
loop