I am using dark basic pro
i ran into a strange problem in my program i cannot understand it and have no idea what caused it as far as i can tell everything is perfect.
when the character is in the map movement is just fine except he can not move past a certain point to the back or right. here is my source please help thank you.
SET DISPLAY MODE 1280,1024,32
color backdrop 0,1
set ambient light 100
LOAD OBJECT "EXPORT.x",3
load object "bathroom.x",1
LOAD OBJECT "gun.x",5
glue object to limb 5,3,60
scale object 5,.3,.3,.3
roll object right 5,90
yrotate object 5,90
position object 1,0,-250,0
set object speed 3,70
load sound "yled.wav" ,1
loop sound 1,0,50
scale object 3,6000,6000,6000
YROTATE OBJECT 3,180 : FIX OBJECT PIVOT 3
position object 3,0,0,0
Do
obplay#= object playing(3)
if upkey()=0
if obplay# =1
stop object 3
endif
endif
if obplay# =1
gosub obplay:
endif
if upkey()=1
play object 3,72,96
endif
obplay:
angx# = camera angle x()
angy# = camera angle y()
angx# = wrapvalue(angx# + (mousemovey()/2))
angy# = wrapvalue(angy# + (mousemovex()/2))
`update camera
rotate camera 0,angx#,angy#,0
` Store Object angle
AngleY# = object angle Y(3)
`Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 3,12
Endif
Endif
If Leftkey()=1 then Yrotate object 3,Wrapvalue(AngleY#-5)
If Rightkey()=1 then Yrotate object 3,Wrapvalue(AngleY#+5)
X# = Object position x(3)
Z# = Object position z(3)
Position object 3,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
Position camera CameraX#,CameraY#+170,CameraZ#
Point camera X#,Y#+130,Z#
Sync
Loop
A child's dream never dies.