[sb4] How would I go about multiplying a sprite, and making them move at the same time?
Root / Programming Questions / [.]
trickyCreated:
I think it has something to do with RND, but I don't really understand how to use it. Eventual goal is to produce a first game where you have to dodge these octopi; hit one and you lose (yeah, I know, real original, but it's my first game before I move on to what I want to do)
If someone can please explain to me what to do, and how it works.
ACLS BACKCOLOR #C_WHITE BGMPLAY 41 LOADG “SPRITE_LA”,4 X=50:Y=50 'first animated sprite that is controllable SPDEF 0,0,0,32,32 SPDEF 1,32,0,32,32 SPDEF 2,0,0,32,32 SPDEF 3,32,0,32,32 SPSET 0,0:SPOFS 0,X,Y SPANIM 0, “I”,10,0,1,10,2,10,3,0 'below, the animated sprite that I want scrolling towards player, with random amount generating SPDEF 5,64,0,32,32 SPDEF 6,96,0,32,32 SPDEF 7,64,0,32,32 SPDEF 8,96,0,32,32 SPSET 64,0 SPOFS 64,200,200 SPANIM 64, “I”, 20,5,20,6,20,7,20,8,0 LOOP IF BUTTON (1,#B_LLEFT)==1 THEN X=X-1 IF BUTTON(1,#B_LRIGHT)==1 THEN X=X+1 IF BUTTON(1,#B_LUP)==1 THEN Y=Y-1 IF BUTTON (1,#B_LDOWN)==1 THEN Y=Y+1 IF Y<0 THEN Y=0 IF Y>210 THEN Y=210 IF X<0 THEN X=0 IF X>384 THEN X=384 SPOFS 0,X,Y VSYNC ENDLOOP