im making a zelda game to learn on I already made a pong in 2d and 3d. Right now im setting up my sprites and when i move left or right the sprite streches. also he wont go up and his sprite dosent change. what am I doing wrong?
Rem Project: zelda
Rem Created: 2/21/2008 7:14:52 PM
Rem ***** Main Source File *****
`setup screen
set display mode 320,240,16
set image colorkey 64,64,192
sync on
sync rate 10
`load images
load image \"link/walk.bmp\",1
load image \"link/walk up.bmp\",2
load image \"link/walk down.bmp\",3
`create sprites
create animated sprite 1,\"link/walk.bmp\",2,1,1
create animated sprite 2,\"link/walk up.bmp\",2,1,2
create animated sprite 3,\"link/walk down.bmp\",2,1,3
`create variables
current_link=3
sprite_an=0
link_f=sprite frame(current_link)
link_min_frame=1
link_max_frame=2
link_facing=2
link_x=160
link_y=120
link_mirror=0
mirrored=0
`load sounds
`main loop
do
`draw link
sprite current_link,link_x,link_y,current_link
play sprite current_link, link_min_frame, link_max_frame,5
`control link
if upkey()=1 and downkey()=0 and rightkey()=0 and leftkey()=1`move up
current_link=2
link_facing=1
link_mirror=0
endif
if upkey()=0 and downkey()=1 and rightkey()=0 and leftkey()=1
current_link=3
link_facing=2
link_mirror=0
endif
if upkey()=0 and downkey()=0 and rightkey()=1 and leftkey()=0
current_link=1
link_facing=3
link_mirror=0
endif
if upkey()=0 and downkey()=0 and rightkey()=0 and leftkey()=1
current_link=1
link_facing=4
link_mirror=1
endif
`move link
if mirrored=1 then mirrored=0; mirror sprite current_link
if link_facing=1 and upkey()=1 then link_y=link_y-2
if link_facing=2 and downkey()=1 then link_y=link_y+2
if link_facing=3 and rightkey()=1 then link_x=link_x+2
if link_facing=4 and leftkey()=1 then link_x=link_x-2
if link_mirror=1 and mirrored=0 then mirror sprite current_link ; mirrored=1
`face link
`sync
sync
loop
`functions
`subroutines
[img="http://lovelyd.shukuya.com/enters/e3.gif"]