I'm not too familiar with handle image, but i assumed your drawing a gun with up to 90 degrees of fire, and then need the flash effect for the gun for 90 degrees, perhaps this code will work for ya? Oh i think the use of your handle image is wrong, not sure.
Your going to go with either image memory or rotatemage lag
the helpfiles says rotateimage is slow, but i've never used it.So theres two ways to do this that I know of:
1. Load an anim image with 180 frames 1 to 90 with the gun not firing, and 91 to 180 with the gun firing.
ie
gunl=LoadAnimImage("gunl.bmp",55,11,1,180)
If its not preloaded try this:
tmpimage=Loadimage("gunl.bmp")
gunl=createimage(55,55,180) ;yes 55 by 55 cause when you rotate it you'll have to read 55 by 55 i think
then to load the first 90 shots(non firing try)
for x=1 to 90
drawimage gunl,100,100
rotateimage gunl,x
grabimage gunl,100,100,x
next
then either load a new bmp with the gun firing, or add and capture a new image with the gun firing and use this loop to add 91 to 180:
for x=91 to 180 step 1
drawimage gunl,100,100 ;make sure this is the gun firing
rotateimage gunl,x
grabimage gunl,100,100,x
next
keep a current rotation of the degrees say
rot=??
fr=rot
;rot# should be 1 to 90, so if shogunfire=1 double it same ;rotation for the gunfiring
If showgunfire=1 fr=fr*2
;timer stuff
drawimage gunl,x,y,fr
Got it?
or you can use two images and use rotateimage every flip
;one firing, one not firing
gunl=loadanimimage("gunl.bmp",55,11,1,2)
fr=1 ;gunframe not firing
If showgunfire=1 fr=2 ;gunframe firing
drawimage gunl,x,y,fr
rotateimage gunl,rot
;also keep in mind
If rot<0 then rot=0
If rot>90 then rot=90
I hope that helps, If your still having problems send me your code and help ya fix it, its better if i know what exactly i'm doing. good luck
Your going to go with either image memory or rotatemage lag
the helpfiles says rotateimage is slow, but i've never used it.So theres two ways to do this that I know of:
1. Load an anim image with 180 frames 1 to 90 with the gun not firing, and 91 to 180 with the gun firing.
ie
gunl=LoadAnimImage("gunl.bmp",55,11,1,180)
If its not preloaded try this:
tmpimage=Loadimage("gunl.bmp")
gunl=createimage(55,55,180) ;yes 55 by 55 cause when you rotate it you'll have to read 55 by 55 i think
then to load the first 90 shots(non firing try)
for x=1 to 90
drawimage gunl,100,100
rotateimage gunl,x
grabimage gunl,100,100,x
next
then either load a new bmp with the gun firing, or add and capture a new image with the gun firing and use this loop to add 91 to 180:
for x=91 to 180 step 1
drawimage gunl,100,100 ;make sure this is the gun firing
rotateimage gunl,x
grabimage gunl,100,100,x
next
keep a current rotation of the degrees say
rot=??
fr=rot
;rot# should be 1 to 90, so if shogunfire=1 double it same ;rotation for the gunfiring
If showgunfire=1 fr=fr*2
;timer stuff
drawimage gunl,x,y,fr
Got it?
or you can use two images and use rotateimage every flip
;one firing, one not firing
gunl=loadanimimage("gunl.bmp",55,11,1,2)
fr=1 ;gunframe not firing
If showgunfire=1 fr=2 ;gunframe firing
drawimage gunl,x,y,fr
rotateimage gunl,rot
;also keep in mind
If rot<0 then rot=0
If rot>90 then rot=90
I hope that helps, If your still having problems send me your code and help ya fix it, its better if i know what exactly i'm doing. good luck