Problem with triggering an event at the specific animation frame repeatedly

So I have an animation on loop with 60 frames. On frame 30, the boss is supposed to shoot. The problem is, that it seems to not trigger at every frame 30. It sometimes goes through the animation without triggering the event. Like, he opens his mouth at 30, but nothing happens, but then the next time it does. It’s inconsistent. He might even not trigger it a few times in a row. I’ve been messing with this for a long time.

The sheet looks like this:

Video of the problem:

Any ideas on what I am doing wrong?

Hi! Unfortunately I don’t have direct answer for you, but you can try to troubleshoot by creating a new Text object, and without any condition put the text of that object to Boss Animation name + Current Frame. By this way you can monitor what is happening, e.g. does it jump over some frames (in that case the reason might be a performance issue).

The event where you have condition of “Animation of the frame [Boss] = 30” is a sub event of the event, which can be seen on top of your screenshot. Is it sure that all those conditions are also true every time when you would like to see shooting at the frame 30?

Hope this helps at least somehow. :slight_smile:

btw. nice looking game! :slight_smile:

I made sure that they are. It used to work before I added the animation to the boss. Before the animation I had it on a 1.5s timer and it worked flawlessly. After 8 attacks it went to another event as this one was “finished”. It works in any other way, it just seems that the “animation frame” event doesn’t work well for me. Not on a bad laptop or on my newer rig (the fps is very high on the second one, same as my monitor 144fps. So performance wise it should be fine.)). I tried to cap it at 60, still no effect. I tried in many combinations, but it just doesn’t work. No other event seems to be interrupting with it. Even if I slow the animation down, it sometimes doesn’t fire, same symptoms. Console and Dev Tools show no errors etc.

I tried the text thing and it goes over them normally, as far as my old eyes see.

Edit: I fixed it by making it 30 or above, instead of exactly 30, which is a workaround and it works for what I need it for, since it triggers once at the right frames.

1 Like