• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM Collision animation issues

C

Club_song

Guest
Friends, I just started making my first tutorial game. But I decided not to follow the guide, but to create a slightly different project.
I created a game where the paddle goes left and right and hits the ball. The paddle is an animal. And the ball is an tomato. When the animal beats it off, he must close his eyes for a second. I created 2 animations - an animal with open eyes and closed ones.
But I couldn't do it. The animal closes its eyes and does not open it again. How can make eyes open?

Безымянныйвыыввывв.png
This is what the object looks like. And this is the code I used:
GML:
sprite_index = obj_norka1;
image_speed=0;
If image_index=1
{
image_index =0;
}
Please, help me figure it out. For me, animations and code are the most difficult things in GM 1.4 right now.
Thanks for attention.
 
Friends, I just started making my first tutorial game. But I decided not to follow the guide, but to create a slightly different project.
I created a game where the paddle goes left and right and hits the ball. The paddle is an animal. And the ball is an tomato. When the animal beats it off, he must close his eyes for a second. I created 2 animations - an animal with open eyes and closed ones.
But I couldn't do it. The animal closes its eyes and does not open it again. How can make eyes open?

This is what the object looks like. And this is the code I used:
GML:
sprite_index = obj_norka1;
image_speed=0;
If image_index=1
{
image_index =0;
}
Please, help me figure it out. For me, animations and code are the most difficult things in GM 1.4 right now.
Thanks for attention.
Assuming that image_index 1 represents open and 0 represents closed:
GML:
image_index = 0
alarm_set( 0, room_speed )
Now create an alarm event and in alarm 0:
GML:
image_index = 1
 
Top