I was trying to make a matrix with a little kight on it, and when I tried to compile it, the compile activity bar appears like normal, but it does not begin to fill up, as any DBpro user is so used to. Then, DBpro minimized like it was going to run the program like normal, then the screen went black (also like normal), but then DBpro popped back up. No error messages. Nothing. What is going on here? Is this a bug or a problem with my code? I am using DBpro and Nuclear Glory collision, although I do not believe NG is at fault here. Any help is appreciated!
Here is code:
Sync On
Sync Rate 30
Rem make matrix
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "grass1.bmp",1
Prepare matrix texture 1,1,2,2
Rem Randomize the matrix
randomize matrix 1,250
StartCollisionPRO(000000000, 000000000, 000000000)
StartCollisionDebugPRO()
rem declare constants
#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_NONE=5
#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_LOCK=3
#Constant DYN_RESP_LOCK_NOTURN=4
#constant TYPE_PLAYER
#constant TYPE_WORLD
Rem Place random texture on each matrix tile
For x = 0 to 19
For z = 0 to 19
t = rnd(3)+1
Set Matrix Tile 1,x,z,t
Next z
Next x
Rem Update the changes to the matrix
update matrix 1
rem create player
player = 1
load object "H-Knight-Idle.x",player
append object "H-Knight-Move.x",player,25
append object "H-Knight-Attack1.x",player,50
append object "H-Knight-Impact.x",player,75
rem set up player
CollisionTypePro( player, TYPE_PLAYER )
SetObjRadiusPro( player, 3, 3, 3 )
SetObjScalePro(player,950,950,950)
yrotate object player,180
fix object pivot player
stand = get ground height(1,1000,1000)
position object 1,1000,stand,1000
set object collision to boxes 1
position camera 1000,stand,1000
Rem Main loop
Do
Rem Store Object angle Y in aY#
aY# = Object angle Y(1)
Rem Control input for camera
If Upkey()=1 then Move object 1,1
If Leftkey()=1 then Yrotate object 1,Wrapvalue(aY#-2.5)
If Rightkey()=1 then Yrotate object 1,Wrapvalue(aY#+2.5)
Rem get player object position and store in X# and Z#
X# = Object position x(1)
Z# = Object position z(1)
Rem get new camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
Rem position camera
Position Camera cX#,100,cZ#
Rem point the camera at the player object
Point camera X#,50,Z#
Rem Refresh Screen
Sync
Loop
"I attribute the quarrelsome nature of the Middle Ages young men entirely to the want of the soothing weed."
-Jerome K. Jerome(1859-1927),Writer