Hi i have a animated sprite with 5 subimage.
Is possible to play one time all images when user click on a button, and than stop to subimage n° 5
i have proble to code it.
May you help me, i have to give project to my Professor in mondey?
Play sprite animation one time
Started by Angelone, Oct 15 2011 03:52 PM
5 replies to this topic
#1
Posted 15 October 2011 - 03:52 PM
#2
Posted 15 October 2011 - 04:08 PM
That's easy enough.
Edit: Is using GM in programming class a norm? I've seen many posts like yours.
//Create event image_speed = 0 image_index = 4 //Mouse button pressed event image_index = 0 //Step event image_speed = (image_index != 4)The stuff in Step event could be replaced by this:
if image_index = 4
image_speed = 0
else
image_speed = 1
You should modify after which image you want it to display when on standby.Edit: Is using GM in programming class a norm? I've seen many posts like yours.
Edited by LOS.A, 15 October 2011 - 04:09 PM.
#3
Posted 15 October 2011 - 06:02 PM
Or, you can try this:
//Create event image_speed = 0 //Mouse button pressed event image_speed = 1 //Other: Animation end image_speed = 0 image_index = 5
#4
Posted 16 October 2011 - 01:53 PM
Edit: Is using GM in programming class a norm? I've seen many posts like yours.
Hi LOS.A we use GM lite in our "cognitive technology" course, we use GM to developt games for the reabilitation of cognitive disabilities. Now i'm developing a game aroud the theories of famous psychologis J. Piaget.
Thank's a lot for your help.
Angelone
#5
Posted 16 October 2011 - 01:56 PM
Ohh, that's very nice! I had no idea this was the case. I'm glad.
#6
Posted 15 November 2012 - 02:54 PM
Hey guys, sorry for bring this post back, but i would not create a new one :]
I'm on the same problem of playing one time, but it's not a separated object, it's with the main character.
i tried to think with the solution above, but if i code this on step event, it would happens with all animations.
i want the char to attack (1 time animation) and then come back to standing animation.
sorry for anything i'm also learning all this tool.
thanks for the patience
Edit: Figured out!
I'm on the same problem of playing one time, but it's not a separated object, it's with the main character.
i tried to think with the solution above, but if i code this on step event, it would happens with all animations.
i want the char to attack (1 time animation) and then come back to standing animation.
sorry for anything i'm also learning all this tool.
thanks for the patience
Edit: Figured out!
Edited by tsenna, 16 November 2012 - 05:11 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











