Jump to content

Changing sprite frame


Recommended Posts

Managed to stuff my back over the weekend so am sat at home twiddling my thumbs so i thought i'd get back to JagStudio.


I have a sprite (24 x 24 px ) which has 3 frames of animation, so the image is  24 x 72 ( verticaly stacked )


I've been able to display my sprite and move it around no problem - but as soon as i try to change the frame I get a jumbled mess.


Is this code correct ?

pframe = 1

sprite[player].gfxbase = pgfx_loc+(pgfx_size*pframe)

The rapinit looks correct and there is nothing in there that i can see where you specify the number of frames.


Thanks for any advice.

Link to comment
Share on other sites

yeah, sorry


is called at the start and outside the loop


I think my code is correct, i may have my rapinit wrong somewhere, think i'll see if OMF's tool gives me the same settings for this image :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...