Well
I got some movement code that i will be using.
If upkey()=1 and leftkey()=0 and rightkey()=0 then a#=wrapvalue(angle#) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if downkey()=1 and leftkey()=0 and rightkey()=0 then a#=wrapvalue(angle#+180) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if leftkey()=1 and upkey()=0 and downkey()=0 then a#=wrapvalue(angle#-90) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if rightkey()=1 and upkey()=0 and downkey()=0 then a#=wrapvalue(angle#+90) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if leftkey()=1 and upkey()=1 then a#=wrapvalue(angle#-45) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if rightkey()=1 and upkey()=1 then a#=wrapvalue(angle#+45) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if rightkey()=1 and downkey()=1 then a#=wrapvalue(angle#+135) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if leftkey()=1 and downkey()=1 then a#=wrapvalue(angle#-135) : x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
y#=get ground height(1,x#,z#)+50.0
position object 1,x#,y#,z#
yrotate object 1,wrapvalue(a#+90)
if shiftkey()=1 then inc behind#
if shiftkey()=0 then behind#=0
if behind#>0 and behind#<2 then angle#=wrapvalue(object angle y(1)-90)
camdist#=300 : camhigh#=y#+100.0 : camfade#=3.5
set camera to follow x#,y#,z#,angle#,camdist#,camhigh#,camfade#,1
point camera x#,y#,z#
Well when i use this code in project i am programming, whenever i decide to go in a diagnal movement (i have it programmed) my whole program starts to glitch. I'm not sure if this is PC error or DBP error but i would like to know.
Any help apprecieted.
--Eric
Opinions are like a$$holes, Everybody has one.