everything i try either messes with my drawing code for my player or just doesnt work can anyone help with a small snippet to assign a velocity to many different sprites?
cheers
set display mode 800,600,32
cls 0
sync rate 0
hide mouse
dim plane_x(20)
dim plane_y(20)
dim plane_speed(20)
dim plane_move(20)
load bitmap "backg.bmp"
load bitmap "suball.bmp",1
get image 1,0,0,150,32
get image 2,153,0,303,32
get image 3,314,18,460,71
get image 4,482,21,628,71
get image 5,655,12,802,65
get image 6,823,10,969,66
delete bitmap 1
load bitmap "plane2.bmp",7
get image 7,3,6,74,27
delete bitmap 7
load bitmap "plane3.bmp",8
get image 8,1,9,73,25
delete bitmap 8
load bitmap "plane4.bmp",9
get image 9,4,12,83,29
delete bitmap 9
load bitmap "plane5.bmp",10
get image 10,4,8,82,32
delete bitmap 10
load bitmap "plane6.bmp",11
get image 11,1,4,84,33
delete bitmap 11
load bitmap "plane7.bmp",12
get image 12,6,8,80,28
delete bitmap 12
load bitmap "missile1.bmp",13
delete bitmap 13
load bitmap "new.bmp",14
delete bitmap 14
missilex=0
missiley=0
missilespeed=20
missilefired=0
sprite 7,plane_x,plane_y,7
sprite 8,plane_x,plane_y,8
sprite 9,plane_x,plane_y,9
sprite 10,plane_x,plane_y,10
sprite 11,plane_x,plane_y,11
sprite 12,plane_x,plane_y,12
sprite 13,missle_x,missle_y,13
sprite 14,missle_x,missle_y,14
hide sprite 7
hide sprite 8
hide sprite 9
hide sprite 10
hide sprite 11
hide sprite 12
hide sprite 13
hide sprite 14
for plane = 1 to 20
plane_x(plane) = rnd(620)
plane_y(plane) = rnd(45)
plane_move(plane) = 7
next plane
do
sync on
speed= -10
for planes = 1 to 4
sprite planes,plane_x(planes),plane_y(planes),7
plane_move(planes) = plane_move(planes) + 1
if plane_move(planes) > 4 then plane_move(planes) = 1
next plane
sync
rem control of the sub
IF upkey()=1
y = y - 5
direction = 1
ENDIF
IF downkey()=1
y= y + 5
direction = 1
ENDIF
IF leftkey()=1
x= x - 5
direction = 2
ENDIF
IF rightkey()=1
x= x + 5
direction = 1
ENDIF
if downkey()=1 and rightkey()=1
direction = 5
endif
if downkey()=1 and leftkey()=1
direction = 3
endif
if upkey()=1 and rightkey()=1
direction = 6
endif
if upkey()=1 and leftkey()=1
direction = 4
endif
if x>650 then x=650
if y>568 then y=568
if x<0 then x=0
if y<450 then y=450
if keystate(57)=1
missilefired=1
missilex=x+80
missiley=y-5
missilefired=1
endif
if missilefired=1
`play sound 50
`stop sound 50
endif
if keystate(57)=1 then missilefired=1
if missilefired=1
paste image 13,missilex,missiley
missilex=x+80
missiley=missiley-missilespeed
`play sound 50
endif
`missilefired=0
`endif
if missiley<0
missiley=missiley
missilefired=0
endif
if missilefired=0
missilex=x+120
missiley=y-5
endif
sprite 1,X,Y,direction
sprite 13,5,14,13
rem ship weapons
loop
delete sprite 7
delete sprite 8
delete sprite 9
delete sprite 10
delete sprite 11
delete sprite 12
delete sprite 13