Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Sprites! Animations!

Author
Message
Problems with mirrowing sprite
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 30th Mar 2003 04:52
Hey im trying to make a 2d fighting game, like marvel vs capcom, and all those good ones. Anyhow im having problems binding the keys to do different animations, i can only make one animation, with every key,i want to make the upkey play a jump animation, but it will only play the run animation, just look at this and tell me what is wrong

load bitmap "sky.bmp"
load bitmap "sky.bmp",1

load music "overclocked.mid",1 : loop music 1

load bitmap "runner.bmp",2

load bitmap "runner.bmp",3

FOR y=0 to 1
FOR x=0 TO 6
GET IMAGE 1+x+(y*7),(x*89),(y*120),(x*89)+89,(y*120)+120
NEXT x
NEXT y

xpos=0
ypos=300
image=1

sync on

do

If Downkey()=1 then ypos=ypos+6 : If ypos>640 then ypos=-64

If Leftkey()=1 then xpos=xpos-4 : IF xpos>640 THEN xpos=-64

If Rightkey()=1 then xpos=xpos+6 : IF xpos>640 THEN xpos=-64

If rightkey()=1 then image=image+1 : IF image>12 THEN image=2

If mouseclick()=1 then xpos=xpos+12 : IF xpos>640 THEN xpos=-64

If mouseclick()=1 then image=image+1 : IF image>12 THEN image=2

If mouseclick()=2 then xpos=xpos-12 : IF xpos>640 THEN xpos=-64

sprite 1,xpos,ypos,image

SYNC : SLEEP 20

loop
Problems with mirrowing sprite
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 30th Mar 2003 04:56
Some of it does nothing at all, try to over look that

Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 30th Mar 2003 06:24
I suggest fixing your format. It looks like you just used a bunch of snippets! It's amazing what making your own programs can do. :-s

"Everyone has a photographic memory . . . some just don't have film."
Problems with mirrowing sprite
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 31st Mar 2003 01:57
yeah i dont know what u mean

Ben
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location: United Kingdom
Posted: 31st Mar 2003 14:31
you need a set current command.



Nothing in life is worth doing if it's hard...

... Except programming
Problems with mirrowing sprite
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 1st Apr 2003 07:53
im new to dark basic, perhaps u can give me an example

Login to post a reply

Server time is: 2024-09-20 03:45:38
Your offset time is: 2024-09-20 03:45:38