hello there
for my college project im making a 2D game in darkbasic classic. i have my movements and map ready i just cant seem to control the bullets.
they travel for so long and then loop, so my character looks like he has mind bullets. here is my code which keeps looping:
MOVEBULLETRIGHT:
If Sprite Exist(10)=1
If BL<20
BRx=BRx+10
Inc BL
sprite 10,BRx,BRy,206 : scale sprite 10,250
endif
endif
If Sprite Exist(10)=1
If BL=>20
BRx=Sprite X(1)
BRy=Sprite Y(1)
pf=0
BL=0
endif
endif
RETURN
and heres another code i am trying, which is quite inefficient in my game as the closer the character is the more bullets they can fire:
MOVEBULLETDOWN:
If Sprite Exist(13)=1
If Sprite Y(13)<481
BDy=BDy+15
Inc BL,5
sprite 13,BDx,BDy,206 : scale sprite 13,250
endif
endif
If Sprite Exist(13)=1
If Sprite Y(13)>481
pf=0
BDx=Sprite X(1)+10
BDy=Sprite Y(1)
endif
endif
RETURN
Also im having issues with loading an AVI as an intro, is it the codec not being IR45 and i have tried cinepak.
oh yeh just looking for a push in the right direction, no spoon feeding please, i wont learn that way.
thank you