Download

Squash & stretch timeline animation

Hello again, I was wondering if anyone could help me out with an issue I`m having with implementing a timeline.

You see, I have been trying to make the health pickup in the game I have been working on animate by rocking back-and-forth a bit with the health pickup stretching & squashing in the process to add a bit of character, as opposed to the coin pickups which simply rotate in place. Since I was already using squash & stretch in the player character`s landing animation as well as the damage animation for jumping on enemies, I decided it would be faster just to copy the timeline from one of those and modify it for the health pickup.

Unfortunately though, things have not gone as I would have liked, as for some reason when I begin play, the health pickup is missing. I have no idea as to why this happening and I was hoping that someone would help me out figure out what I`m doing wrong and fix this issue.

As always, any help whatsoever would be greatly appreciated!

Event Graph:

Timeline:

Is this inside the health pickup blueprint? ( not the level BP ).

You asked for it. Not an answer to the TL thing but I like organising behaviours like this into Actor Components:

image

You can parametrise what’s needed, and even sample curves for more control. This way you can then add a component like this to any actor:

image

And end up with with something highly modular. Think of this as of a Special Ability, a bunch of additional functionality you can give or take away from actors, even during run time.

2 Likes

Thanks for your effort, it’s certainly a lot than what I was excepting.

Unfortunately though, it doesn’t fix the underlying problem. The health pickup is still absent when I begin play, just like when I was trying to use a timeline for the squash & stretching animation. Its worth pointing out that the other types of health pickups that I haven’t tried applying the squash & stretching animation to are still present.

I don’t know why this is happening. Did I incorrectly set up the actor component? Is there something within the health pickup blueprint that’s causing the problem? Or is it something else entirely that I’ve overlooked?

Actor Component blueprint:

Health pickup blueprint:

The health pickup is still absent

Is the blueberry there if you do not add the component? Can you show the berry’s hierarchy?

Regarding the component itself, ensure the speed is set to a non 0 values and that the component is actually added to the actor.


I mean, this should absolutely work fine with a timeline - so I’d look into that first. My suggestion was a mere alternative that’d work great if you wanted to add a bunch of abilities to actors, extending it beyond what the TL can do.

1 Like

Yup, if I delete it then the item is once again present.

I assume this is what you’re referring to?

component_hierarchy

Unless you meant this instead:

component_hierarchy_2

I’m not sure why the placement of the actor component within the component hierarchy would cause the item to disappear, especially since as I said the item was disappearing back when I was trying to use a timeline to animate the item.

Had a power cut while typing the message - area’s flooded a bit.

I think I know why it’s messed up for you. Add a scene component as the root. Test it with the TL and, optionally, with the stuff I suggested.

You’re trying to work with relative values but there’s nothing relative to work with:

image

This will be used as absolute in lieu of relative stuff - so your berry should hang out at 0,0,1 world coordinate.

1 Like

Okay that worked, thanks for all the help!

1 Like