How to play a crosshair animation once in a tick?

Hi, i have a LineTrace from my camera to my front objects that has been executed every frame by a Event Tick, the problem is i want to play a ui animation, but this, when running on the tick, fails to play to the end, but runs the start of the animation all the time, how can I run the animation from start to finish and keep the tick event doing its job? (The animations are a changing size in the shape of the crosshair).

Try using this kind of setup. It give the cursor enough time to do one or the other:

EDIT: You could also move this login into the crosshair BP if you want to hide it away…

Unfortunately it did not work, because although the animation goes all the way, it is played again and again without end, I will attach video

It makes no sense! :slight_smile:

Can you put a print string in both these places, I’m wondering if it’s swapping between useable and not useable constantly:


As I understand, you want your crosshair to grow when there’s an object you can interact with in front of you?

I’d suggest a more event-based approach: first, you determine if you can interact with the object, and only play animation if you can, and play the reverse animation if you can’t.

To avoid casting on tick, I’d add an actor tag, say “interactable” to every actor you can interact with, and then do something like this:

It’s the general idea; of course you’ll have to tweak it in order to work with your setup.

And another thing: use only one animation, since it’s the same, but reversed. Just Play Forward and Play Reverse: this way if you turn away mid-animation, it will blend seamlessly, instead of jumping into another animation.

Your setup work’s perfectly! Thanks you so much, thanks also to ClockworkOcean for the help!