T2008
Member
For some reason, I often run into problems with the Animation Event not trigger and my animations not playing properly. I've come up with this code to avoid the animation event entirely and it worked in the limited way I tried it. Does anyone see any issues with the below code in Step Event.
It took me awhile when I first started using GM that the image index runs at greater or less than whole numbers (ie 1.3, etc). Are there any other tricks or pitfalls to know about the animation end event? I find this and the alarms some of the most unreliable parts to GM and it's probably because I don't know exactly how to use them right.
It took me awhile when I first started using GM that the image index runs at greater or less than whole numbers (ie 1.3, etc). Are there any other tricks or pitfalls to know about the animation end event? I find this and the alarms some of the most unreliable parts to GM and it's probably because I don't know exactly how to use them right.
Code:
//Set Sprite Index
if (!talking) {
sprite_index = spr_zombie1_idle_w;
image_speed = 1;
}
if (talking) {
image_index = 0;
image_speed = 1;
sprite_index = spr_zombie1_scream_w;
if (image_index >= 4) { //last image of sprite
image_speed = 0;
}
}