I'm back, sorry it tooke me so long...heres a few things.
1. Instead of Rect 0,0,,640,480 each frame, use Clscolor 50,100,150..it'll auto clear the screen to that color...
2. Each time it loops right now it reads the angle every time and changes the animation loop back to the first frame of whichever direction the mouse is from the char. To toggle the the three frames, use me\frm=me\frm+1 after flip and before the wend. Then run a few ifs if frame is 4,7,10 the end of that loop then restart ie If me\frm=4 then me\frm=1,etc. You should be able to check this without half a dozen ifs with left$ and divided it by 3 though but i haven't tried it.,If you want the character to always look in the direction of the mouse, you'll have to keep two angles, the angle its currently moving, vs the angle its facing. Or use If me\speed=0(for the char not moving) me\frm=(1,4 etc from the angle).
3. I would function this out so your main loop looks like the following.
Of course i tend to over function things too....I didn't have an aniimage so i couldn't test it totally though, and for some reason my old testfile of this got deleted *growl*
I used text 10,10,angle and test 10,50,me\frm add those in before flip and you'll see what its doing. I always add text, such and such a spot so i can track everything.
You may also want to use the field bullet and use it as a type in player also. Well good luck, hope that helps
1. Instead of Rect 0,0,,640,480 each frame, use Clscolor 50,100,150..it'll auto clear the screen to that color...
2. Each time it loops right now it reads the angle every time and changes the animation loop back to the first frame of whichever direction the mouse is from the char. To toggle the the three frames, use me\frm=me\frm+1 after flip and before the wend. Then run a few ifs if frame is 4,7,10 the end of that loop then restart ie If me\frm=4 then me\frm=1,etc. You should be able to check this without half a dozen ifs with left$ and divided it by 3 though but i haven't tried it.,If you want the character to always look in the direction of the mouse, you'll have to keep two angles, the angle its currently moving, vs the angle its facing. Or use If me\speed=0(for the char not moving) me\frm=(1,4 etc from the angle).
3. I would function this out so your main loop looks like the following.
Main Loop() Cls ReadAngle Me If Mousehit(2) MovePlayer me If Mousehit(1) Shoot UpdateBullets Color 255,255,255 DrawImage imgplayer,me\x,me\y,me\frm;player gfx Color 255,25,25 Rect MouseX(),MouseY(),2,2; mouse gfx Flip Wend
Of course i tend to over function things too....I didn't have an aniimage so i couldn't test it totally though, and for some reason my old testfile of this got deleted *growl*
I used text 10,10,angle and test 10,50,me\frm add those in before flip and you'll see what its doing. I always add text, such and such a spot so i can track everything.
You may also want to use the field bullet and use it as a type in player also. Well good luck, hope that helps