yes. the line that causes it to actually turn left is the pitch object down line. I am not sure though if there is another line before that somehow influences it.
here is the full code(sorry, it is kind of a mess.)
sync on
`sync rate 0
gosub weather
gosub variables
gosub loadimages
gosub landscape
gosub tanks
`sync off
make light 1
set directional light 1,0,-1,0
turn camera right 1
turn camera left 1
gosub loops
end
loadimages:
if weather<=2
` load image "Texture.bmp",1
` load image "pos_x.bmp",2
color(1)=0
color(2)=255
color(3)=0
else
` load image "Texturesnow.bmp",1
` load image "snow bg.bmp",2
color(1)=255
color(2)=255
color(3)=255
endif
load image "loading now copy.bmp",3
sprite 1,0,0,3
load image "fire.bmp",4
load image "dark03.bmp",5
return
variables:
p1power=100
p2power=100
shotpower=10
variance=5
dim shotangle(2)
x2=209
y2=241
spritenum=3
dim size(32)
dim firepower(4)
dim color(3)
firepower(1)=100
firepower(3)=100
dim maxshotpower(2)
maxshotpower(1)=100
maxshotpower(2)=100
gravity#=0
initshotpower#=40
airresistance#=.006
return
landscape:
`make object plain 60001,664,504
`position object 60001,304,150,25
`texture object 60001,2
`blocks background
make object plain 60002,664,504
color object 60002,0
position object 60002,304,150,20
`makes base
make object plain 60000,640,25
xrotate object 60000,90
fix object pivot 60000
position object 60000,312,-100,0
hide object 60000
`creates hights of landscape
h=100
autocam off
for i=1 to 605
pom=rnd(20)
if pom<=10
h=h+rnd(5)
else
h=h-rnd(5)
endif
make object box i,1,h,25
position camera 305,150,-390
turn camera right 1
turn camera left 1
set camera range 1,500000
repeat
y=object position y(i)
position object i,x,y-1,0
until object collision(i,60000)=1
x=x+1
` texture object i,1
color object i,rgb(color(1),color(2),color(3))
` sync
next i
`for i=1 to 605
` hide object i
` sync
`next i
`stop animation 1
`delete animation 1
delete object 60002
delete sprite 1
sync
`sync off
return
tanks:
`create player tank
load object "H-Tank.x",701
position object 701,25,-75,10
scale object 701,300,300,300
turn object left 701,90
repeat
position object 701,25,object position y(701)+1,10
` set camera to follow object position x(601),object position y(601),object position z(601),0,5,-5,100,0
` sync
until object collision(701,0)=0
make object cylinder 704,1
position object 704,object position x(701),object position y(701),object position z(701)
`do
`point camera object position x(601),object position y(601),object position z(601)
`move camera 1
`sync
`loop
`create computer tank
load object "H-Tank.x",702
position object 702,575,-75,10
scale object 702,300,300,300
turn object right 702,90
repeat
position object 702,575,object position y(702)+1,10
` sync
until object collision(702,0)=0
return
weather:
windspeed=.002
dir=rnd(20)
if dir<=10
winddirection=1
else
winddirection=2
endif
weather=rnd(4)
return
loops:
do
playerturn=1
player=playerturn+700
otherplayer=702
gosub p1turn
playerturn=2
otherplayer=701
player=playerturn+700
if players=1
gosub compshot
else
gosub p2turn
endif
sync
loop
return
p1turn:
repeat
negfactor=1
if downkey()=1 then gosub down
if upkey()=1 then gosub up
if leftkey()=1 then gosub left
if rightkey()=1 then gosub right
if escapekey()=1 then gosub ends
ink 0,0
Text 0,0,str$(shotangle(playerturn))
sync
until returnkey()=1
playerturn=1
gosub shot
return
compshot:
return
p2turn:
repeat
negfactor=-1
if downkey()=1 then gosub down
if upkey()=1 then gosub up
if leftkey()=1 then gosub left
if rightkey()=1 then gosub right
` if escapekey()=1 then gosub ends
sync
until returnkey()=1
playerturn=2
gosub shot
return
shot:
gravadd#=.2
make object sphere 703,5
texture object 703,5
position object 703,object position x(player),object position y(player)+20,object position z(player)
shotspeed#=firepower(playerturn)/2
repeat
move object 703,shotspeed#
pitch object down 703,gravity#
gravity#=gravity#+gravadd#
text 100,100,str$(object position z(703))
sync
until object collision(703,0)
return
down:
shotangle(playerturn)=shotangle(playerturn)-1
firepower(playerturn)=initshotpower#*cos(shotangle(playerturn))
firepower(playerturn+2)=initshotpower#*sin(shotangle(playerturn))
return
up:
shotangle(playerturn)=shotangle(playerturn)+1
firepower(playerturn)=initshotpower#*cos(shotangle(playerturn))
firepower(playerturn+2)=initshotpower#*sin(shotangle(playerturn))
return
left:
position object player,object position x(player)-1,object position y(player),object position z(player)
fuel=fuel-1
gosub collision
return
right:
position object player,object position x(player)+1,object position y(player),object position z(player)
fuel=fuel-1
sync
gosub collision
return
collision:
if object collision(player,0)>0
repeat
position object player,object position x(player),object position y(player)+1,object position z(player)
until object collision(player,0)=0
else
repeat
position object player,object position x(player),object position y(player)-1,object position z(player)
until object collision(player,0)>0
position object player,object position x(player),object position y(player)+1,object position z(player)
endif
return
explode:
`Make explosion
`remstart
hide object 703
Make Object Sphere 704,10
texture object 704,4
ghost object on 704
position object 704,object position x(703),object position y(703),object position z(703)
`Hide Object 4
scale object 704,.1,.1,.1
Make Object Sphere 705,10
position object 705,object position x(703),object position y(703),object position z(703)
texture object 705,4
ghost object on 705
scale object 705,.1,.1,.1
`Hide Object 5
a#=2
b#=2
for i=1 to 40
if i>=5
scale object 704,a#,a#,a#
scale object 705,b#,b#,b#
b#=b#+12
else
scale object 704,a#,a#,a#
endif
sync
a#=a#+12
next i
delete object 703
delete object 704
delete object 705
return
ends:
make object plain 65535,10,5
turn camera right 1
turn camera left 1
position object 65535,camera position x(),camera position y(),camera position z()+10
do
move object 65535,-1
sync
loop
return