ok what im basiclly doing is trying to move my sprite and animate it when the button is clicked im trying to gt it to work as a function but it doesnt seem to be working it just does the first image of the animation im not sure what to change/do
it works just fine if i dont have it as a function
heres the code
load image "edwardstanding.bmp",2
load image "edwardwalkleft1.bmp",6
load image "edwardwalkleft2.bmp",7
load image "edwardwalkleft3.bmp",8
load image "edwardwalkleft4.bmp",9
walkleft = 6
sprite 2,170,90,2
player1x = sprite x(2)
player1y = sprite y(2)
do
sync on
walkleft(player1x,player1y,walkleft)
loop
function walkleft(player1x,player1y,walkleft)
if rightkey()=1
player1x = player1x + 5
inc walkleft,1
if walkleft > 9 then walkleft =6
wait 100
sprite 2,player1x,player1y,walkleft
show sprite 2
endif
endfunction
sorry if posted to many times or something like that i tried editing and i didnt see my message soo sorry
HEY GUYS