Hi, I just want to know what is wrong now? I managed to get this H.O.T.A.S example to work but I had to scrub the hard drive as Windows XP kept locking up and wouldn't let me back in so had to scrub the harddrive, which I diodn't want to do as I wanted to burn all the programming for Dark Basic I had.
Now I have my PC running I am using ME (yuck) but now I keep getting this object does not exist" message which I didn't get before and I know I will have to rip everything out, what is the problem where is it going wrong does anyone know?
rem DARK BASIC EXAMPLE PROGRAM 18
rem ==========================================
rem This program shows free flight movement with H.O.T.A.S sticks
rem ------------------------------------------
rem updated by Vampyre(Ian George)
autocam off
hide mouse
sync on
rem Make wire sky sphere
make object sphere 1,10000
set object 1,0,0,0
rem Load flying object
load object "airplan043.x",2
rem Rotate and fix data so character faces right way
xrotate object 2,0
yrotate object 2,180
zrotate object 2,0
rem Make drone to mark a back position
make object sphere 3,10
rem Set camera range
set camera range 1,10000
rem Set text font
set text font "Arial"
ink rgb(255,255,0),0
set text size 30
rem Main loop
do
rem User prompt
center text 320,0,"FREE FLIGHT ORIENTATION"
center text 320,25,"If you Have any H.O.T.A.S System ,"
center text 320,50,"Use the Joystick to Pitch Up and Down"
center text 320,70,"Use Your H.O.T.A.S. Rudders to Roll"
center text 320,90,"Use Your Joystick Throttle to Move"
center text 320,120,"Use SPACE to Reset"
rem Control free flight object
if joystick up()=1 then pitch object up 2,5
if joystick down()=1 then pitch object down 2,5
if joystick left()=1 then turn object left 2,5
if joystick right()=1 then turn object right 2,5
if joystick twist z()=1000 then roll object left 2,5
if joystick twist z()=-1000 then roll object right 2,5
if joystick slider a()=0 then move camera 20 : move object 2,40
if joystick fire x(4)=1 then move camera 20 : move object 2,100
if spacekey()=1 then rotate object 2,0,0,0
rem HAT control
jhat=joystick hat angle(0)
text 320,160,"HAT signal: "+str$(jhat)
rem **** use these lines below if you want the view to be immediate
rem **** and rem out the other lines that aren't needed
rem **** integrity checks for code alterations are included
rem turnview=0
rem if jhat=27000 or jhat=31500 then turnview=-90
rem if jhat=9000 or jhat=4500 then turnview=90
rem if jhat=18000 or jhat=13500 or jhat=22500 then turnview=180
rem horizontal view position
if turnview>0 and turnview<180 then turnview=turnview-2:if turnview<0 then turnview=0
if turnview>179 then turnview=turnview+2:if turnview>359 then turnview=0
if jhat=27000 or jhat=31500 or jhat=22500 then turnview=wrapvalue(turnview-4):if turnview>180 and turnview<220 then turnview=220
if jhat=9000 or jhat=4500 or jhat=13500 then turnview=wrapvalue(turnview+4):if turnview<180 and turnview>140 then turnview=140
rem vertical view position
if pitchview>0 and pitchview<180 then pitchview=pitchview-2:if pitchview<0 then pitchview=0
if pitchview>179 then pitchview=pitchview+2:if pitchview>359 then pitchview=0
if jhat=18000 or jhat=13500 or jhat=22500 then pitchview=wrapvalue(pitchview-4):if pitchview>180 and pitchview<280 then pitchview=280
if jhat=0 or jhat=4500 or jhat=31500 then pitchview=wrapvalue(pitchview+4):if pitchview<180 and pitchview>80 then pitchview=80
If InKey$() = "1" And cammode = 0 Then cammode = 1 : `Set the camera mode to third person
If InKey$() = "2" And cammode = 1 Then cammode = 0 : `Set the camera mode to first person
If cammode = 0
rem Place camera and set orientation to object
position camera object position x(2),object position y(2),object position z(2)
set camera to object orientation 2
EndIf
If cammode = 1
rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation 2
EndIf
rem Get back position of object for camera
pitch object down 2,11
move object 2,-150
position object 3,object position x(2),object position y(2),object position z(2)
move object 2,150
pitch object up 2,11
hide object 3
rem now set turnview as needed for HAT control
turn camera right turnview
pitch camera up pitchview
rem Update screen
sync
rem and reset the camera view back to normal to center everything
turn camera left turnview
loop
Please help , thank you