Change sub-image question

P

ProjectJM

Guest
Is there a way to change a sprite but set its subimage where the current subimage is ?
 

Roderick

Member
image_index

By default, when you change the sprite_index of an object, it keeps the image_index it had before. So, for example, if you were on image_index 2, and then switched to a new sprite that has at least 3 images (remember, the first is 0), then the new sprite will start at image_index 2. If you are currently at a higher image_index than the new sprite has, it will reset to 0.
 
P

ProjectJM

Guest
image_index

By default, when you change the sprite_index of an object, it keeps the image_index it had before. So, for example, if you were on image_index 2, and then switched to a new sprite that has at least 3 images (remember, the first is 0), then the new sprite will start at image_index 2. If you are currently at a higher image_index than the new sprite has, it will reset to 0.
I know that but there's another problem going on actually:
Iìll post an image to see it I can explain it better!

if I die while the subimage is the blue circle, it changes the sprite into the green one, but it won't go where the blue one is now, it will go when the red is!
 

Attachments

A

Aura

Guest
Sorry, but that still doesn't explain what you're trying to do and what happens. I guess the two sprites have different origins and number of images. But that diagram doesn't explain anything at the moment.
 
Top