JesusOnExtasy
Member
There is a sprite, it has 8 frames.
how to make the sprite play like this:
1-2-3-4-5-6-7-8-7-6-5-4-3-2-1
help me please
how to make the sprite play like this:
1-2-3-4-5-6-7-8-7-6-5-4-3-2-1
help me please
Try an Animation End event withThere is a sprite, it has 8 frames.
how to make the sprite play like this:
1-2-3-4-5-6-7-8-7-6-5-4-3-2-1
help me please
image_index = image_speed > 0 ? sprite_get_number(sprite_index)-1 : 1;
image_speed *= -1;
if sprite_index=spSaraAttack {sprite_index=spSaraStay}
if sprite_index=spSaraStay {sprite_index=spSaraStayAnim}
What does changing the sprite have to do with ping-pong of a single sprite?my Animation End :
GML:if sprite_index=spSaraAttack {sprite_index=spSaraStay} if sprite_index=spSaraStay {sprite_index=spSaraStayAnim}
Rephrase in the form of a question or problem statement.spSaraAttack
and
spSaraStayAnim
You have not clarified if you use those two sprites for two different objects/instances, or if you somehow want to change between them for one instance.I need to spSaraAttack sprite which from 13 frames was played from 1-13 and back from 13-1 and the same thing is necessary for spSaraStayAnim which is 7 frames.
since the ping-pong function does not work in GMS2, I want to do this through codes!
should be like this:
spSaraStayAnim
(1-2-3-4-5-6-7-6-5-4-3-2-1)
spSaraAttack
1-2-3-4-5-6-7-8-9-10-11-12-13-12-11-10-9-8-7-6-5-4-3-2-1
I tried different things but I lack experience, I use GMS2 for only almost 2 months ((
in one ogjectYou have not clarified if you use those two sprites for two different objects/instances, or if you somehow want to change between them for one instance.
One or two instances of this one object?in one ogject
OneOne or two instances of this one object?
The please clarify what Animation End means, with respect to wanting to swap sprites. If you're using Animation End to swap sprite, when would you expect to do the reverse animation? You need some other condition to say, "I'm not going to switch direction, I'm swapping sprite instead". What is the criteria for that?