OKay, ive setup a array list with ships().thrust as a boolean, however an if statment which responds to the switch is not behaving as i expect. Okay heres the code.
repeat
rem Select the active ship.
shipcount = 1
array index to top Ships()
if activeship > 1
repeat
next array index ships()
inc shipcount
until shipcount = activeship
endif
cls rgb(0,0,0)
set cursor 200,200
print ships().thrust; " "; cos(wrapvalue(ships().angle))
sprite 1, 320, 240, 5
rotate sprite 1, ships().angle
if keystate(203)=1 then ships().angle = ships().angle - 5
if keystate(205)=1 then ships().angle = ships().angle + 5
if keystate(200)=1 then ships().thrust = 1
if keystate(208)=1 then ships().thrust = 0
rem This is the problem, even if thrust=1 it doesent execute ? why ?
if ships().thrust = 1
ships().xvol = ships().xvol + (cos(ships().angle+180)/ships().speed)
ships().yvol = ships().yvol + (sin(ships().angle+180)/ships().speed)
endif
starxvol = ships().xvol
staryvol = ships().yvol
angle = wrapvalue(angle)
gosub spacedust
sync
until spacekey()=1
Also, while im beggin for your mercy, i have a case statment that seemes to be fine, but wont change the ink coulor.
spacedust:
for count = 1 to 100 step 1
stars(count).lxpos = stars(count).xpos
stars(count).lypos = stars(count).ypos
stars(count).xpos = stars(count).xpos + (stars(count).speed*starxvol)
stars(count).ypos = stars(count).ypos + (stars(count).speed*staryvol)
if stars(count).xpos > 640
stars(count).lxpos = 0
stars(count).lypos = rnd(480)
stars(count).xpos = stars(count).lxpos + (stars(count).speed*starxvol)
stars(count).ypos = stars(count).lypos + (stars(count).speed*staryvol)
endif
if stars(count).xpos 480
stars(count).lxpos = rnd(640)
stars(count).lypos = 0
stars(count).xpos = stars(count).lxpos + (stars(count).speed*starxvol)
stars(count).ypos = stars(count).lypos + (stars(count).speed*staryvol)
endif
if stars(count).ypos