my apologies for the double post. its not that i thought that the mods were being lazy more that i assumed it didn't get sent for some reason. but allow me to explain my problem. I started over since it was not alot of code.
heres the code i used for moving:
if rightkey()=0 and leftkey()=1 and upkey()=0 and downkey()=0`checks if left key is being held
if v_link_facing<>3`checks if character is alread facing left
set sprite frame 1,4`if characher is not facing left make him immediat;ley face right
facing=3`set facing to left
endif
v_link_min_frame=4`sets min frane
v_link_max_frame=5`sets max frame
basically it checks to make sure only one key is held then it checks a variable (v_link_facing) to see if link is already facing that direction *I'll tell you why this is in there later* if it is not, the it instantly set the sprites frame to the first frame in the animation. Then it sets the min and max frame to the values used in the animation and sets the facing.
Now the problem with this (and the reason i need the facing check) is when i set the 2 frame variables, the first time the sprite animation is played the sprite plays the frame before it. then plays those 2 on a loop. every time. Now my issue with this method is when the sprite is changed. the sprite hangs for a second because the same frame is played twice, causing an extended first frame.
Is there a more efficient way to go about this? I don't understand why its displaying 3 frames when i implicitly specify 2. whats going on here.
heres my full source code:
Rem Project: lnk
Rem Created: 2/23/2006 7:55:09 PM
Rem ***** Main Source File *****
`set up screen
sync on
sync rate 0
set display mode 640,480,32
set image colorkey 65,116,48
`load images
load image "link_walk.bmp",1
`create sprites
create animated sprite 1,"link_walk.bmp",5,2,1
`set up variables
v_link_facing=1
v_link_walking=0
v_link_max_frame=3
v_link_min_frame=2
v_link_x=320
v_link_y=240
`main loop
do
sprite 1,v_link_x,v_link_y,1`positions link at required position
play sprite 1,v_link_min_frame,v_link_max_frame,150`plays links sprite at given values
`check for control
if rightkey()=1 and leftkey()=0 and upkey()=0 and downkey()=0`checks if right key is being held
if v_link_facing<>0`checks if character is alread facing right
set sprite frame 1,6`if characher is not facing right make him immediat;ley face right
facing=0`set facing to right
endif
v_link_min_frame=6`sets min frane
v_link_max_frame=7`sets max frame
endif
if rightkey()=0 and leftkey()=1 and upkey()=0 and downkey()=0`checks if left key is being held
if v_link_facing<>3`checks if character is alread facing left
set sprite frame 1,4`if characher is not facing left make him immediat;ley face right
facing=3`set facing to left
endif
v_link_min_frame=4`sets min frane
v_link_max_frame=5`sets max frame
endif
sync
loop
and i'll attach the image spriteset im using for link
thanks in advance for any help
[img="http://lovelyd.shukuya.com/enters/e3.gif"]