Rows In Images
Blitz3D Forums/Blitz3D Beginners Area/Rows In Images
| ||
I have been using LoadAnimImages to use frames in my 2d animations. Is it possible to load a certain row, like in this image for example: ![]() If so, or not, how? |
| ||
LoadAnimImage has a parameter - first You can multiply the number of tiles wide by the row number to get the first value. i.e. LoadAnimImage("my image", 24,24, 10*rownum, 10) |
| ||
That was easy! Thanks :o) |
| ||
np :) |
| ||
You can't load a certain row of an image using the LoadAnimImage function. The first parameter is to tell Blitz what to start numbering the frames from - usually 0 or 1, but could be anything else. |
| ||
The first parameter is to tell Blitz what to start numbering the frames from - usually 0 or 1, but could be anything else. ummm... Graphics 640,480,0,2 Global img = LoadAnimImage("dg_armor32.bmp", 32,32,10, 10) Global frame = 0 While Not KeyDown(1) Cls DrawImage img, MouseX(), MouseY(), frame If MouseHit(1) Then frame = frame +1 If frame > 9 Then frame = 0 Flip Wend End |