Sphere growing / decreasing effect

Hi,

I am quite new in Unreal and I’d like to grow and decrease a sphere automatically.

Sphere starts from a “normal” size (1, 1, 1) and shoul grow up to a large size (2, 2, 2) and as soon as the sphere reaches large size it should go back to normal size and it’s repeating.

I found out that I can do this effect with timeline and it is working that the sphere is growing.

But I cannot “trigger” the effect to go back to normal size.

I tried to follow this YouTube-tutorial here:

but it is not working properly. I am confused.

Any advice?

Thank you and best regards,
Dominic

Here is an example:

](filedata/fetch?id=1837502&d=1606740519)

](filedata/fetch?id=1837503&d=1606740524)

PS: use “Set Actor Relative Scale 3D” to scale the actor itself and not just the sphere component.

My bet is that your decrese timeline has never played to be able to rewind.

Aside from that, it’s just bad coding.

first of, running a timeline on tick is just silly.
“Hey engine, every tick you will run this code that will run for x ticks”.

On top of that, you are triggering the boolean before the timeline has had a chance to complete. This would cause the code to jump to the other path after every tick.

Delete the tick event. Fire the events with custom events. One for each action.
and move the boolean changes to the finished part.

You also only need 1 timeline, with proper play/reverse process.

Will look the tutorial over, but if the code you show came from that, I would wager you shouldn’t be wasting time with it. Yea it’s not horrible, but it is bad.
its not OnTick however.

Got me really curious as to who would teach that, luckily, it’s not the case. It’s an input action that makes the character grow / shrink.

MostHost LA is still correct - you don’t need 2 timelines. There’s a “Reverse from End” for a reason. See comments in sample:

https://forums.unrealengine.com/core/image/gif;base64

See this Example GIF.