Ok, Couldn't work out why it was happening but fixed it.
Main loop code:
rem main loop
do
ox# = object position x(1)
oy# = object position y(1)
oz# = object position z(1)
angy# = object angle y(1)
ox2# = object position x(2)
oy2# = object position y(2)
oz2# = object position z(2)
angy2# = object angle y(2)
spd# = 5
rem setting up player 1 and player 2
Health_1=100
text 0,0,str$(Health_1)
if keystate(72) ` forward
nx#=newxvalue(ox#,angy#,spd#)
nz#=newzvalue(oz#,angy#,spd#)
position object 1,nx#,oy#,nz#
endif
if keystate(76) ` backward
nx#=newxvalue(ox#,wrapvalue(angy#-180),spd#)
nz#=newzvalue(oz#,wrapvalue(angy#-180),spd#)
position object 1,nx#,oy#,nz#
endif
`if keystate(72) then move object down 2,5
`if keystate(76) then move object up 2,5
if keystate(75) then yrotate object 1,object angle y(1)-2
if keystate(77) then yrotate object 1,object angle y(1)+2
if returnkey()
position object 16,object position x(1),object position y(1)+40,object position z(1)
yrotate object 16,object angle y(1)
endif
Health_2=100
text 0,384,str$(Health_2)
if keystate(17) ` forward
nx2#=newxvalue(ox2#,angy2#,spd#)
nz2#=newzvalue(oz2#,angy2#,spd#)
position object 2,nx2#,oy2#,nz2#
endif
if keystate(31) ` backward
nx2#=newxvalue(ox2#,wrapvalue(angy2#-180),spd#)
nz2#=newzvalue(oz2#,wrapvalue(angy2#-180),spd#)
position object 2,nx2#,oy2#,nz2#
endif
`if keystate(17) then move object down 2,5
`if keystate(31) then move object up 2,5
if keystate(30) then yrotate object 2,object angle y(2)-2
if keystate(32) then yrotate object 2,object angle y(2)+2
if controlkey()
position object 17,object position x(2),object position y(2)+40,object position z(2)
yrotate object 17,object angle y(2)
endif
rem setting camera to follow players
position camera 1,object position x(1)-300,150,object position z(1)-300
point camera 1,object position x(1),object position y(1),object position z(1)
position camera 2,object position x(2)+300,150,object position z(2)+300
point camera 2,object position x(2),object position y(2),object position z(2)
rem boundaries and physics
if object collision(1,2) then move object up 1,5 : move object up 2,5
for x=3 to 15
if object collision(1,x) then position object 1,ox#,oy#,oz#
if object collision(2,x) then position object 2,ox2#,oy2#,oz2#
next x
rem missile properties
if object position y(16)=object position y(1)+40 then move object 16,15
if object position y(17)=object position y(2)+40 then move object 17,15
rem updating screen
sync
rem end loop
loop
It seemed changing the way they move did the trick. Also changed this:
sw = screen width()
sh = screen height()
set camera view 1,0,0,sw,sh/2
set camera view 2,0,sh/2,sw,sh
It will still split the screen but allow you to change the screen resolution without the cameras going off the screen. Hope this helps.