How to make item animation stop after pickup?

Hey all,

My question is simple but my knowledge is limited. I have an object - a key to be specific - that bobs up and down on its spot somewhere in the level. Once my character has picked up the key, I want this animation to stop. How can I make this happen?
So far this is what I have:

Many thanks!

hi again stradis,


try this (focus inside red line things)

Hi again!

I tried what you did but it doesn’t seem to change anything. Should I do something within the timeline maybe?

timeline is an effect which makes the value change over time and as i see here your timeline should be making it float so when player collects it , it would be getting attached to player( is it getting attached?) so the effect would continue , so the thing i told you to do was stop it.

is it getting attached to player? because i always have trouble attaching things to player.

how long is the timeline by the way?

It does indeed get attached to the player, right after the player walks up to it. So really the only problem is that the object continues to float once it’s attached to the player

Here is a screenshot of the timeline. It’s 1,5 seconds

oh wait , how come i didn’t notice?
the tick event is causing it to play again.

try this out

Works perfectly, thanks!

you are welcome!

Hey again Stardis!

I take it that the animation for they key is being executed on the Key BP…? You really shouldn’t call a timeline using Event Tick. Timelines have a looping feature that will cause them to continue to play until told to stop.

Use your Event Begin Play node to execute your timeline. Then you can either create a custom event called something like “Stop Timeline” and connect that to the stop and then call that custom event at the end of your Overlap event. Or you can simply run a line from the end of your Overlap to the stop like Prithvi showed above. I like using custom events because they are cleaner.

I take it you don’t yet have the ability to drop the key, so there would not be a reason to set a new time.

Ah I see… that does make sense. I’ll take that into account next time I create something similar. Thank you for explaining!