[REQUEST] "Animation End" event for UI (UMG) (Blueprint)

Hi! I’m working on a chat bubble for one of my NPCs in my 2D game, and I have it set so that it plays a little animation of the chat bubble scaling up to size. I’d like my message to show up afterwards. Currently I’m using delays to achieve this, but I think it would be nice and useful if there were an animation end event for UMG animations, like with Paper2D.

Thank you!

You can use iTween to facilitate this. Use a UMG Scale From/To operation, set an object as the OnTweenCompleteTarget and implement the interface, implement the event, and there you go. Once the scale animation completes, the event will be called and will execute your logic.

I just read through it, it sounds interesting :smiley: Great job working on it, I’ll give it a shot now~

Alright, I’ve been using iTween for ~10 minutes now, and I really like its potential. Thing is, I have no idea how to do what you told me to do, hehe… I have found other uses for it though, so either way I’m happy, but is there a tutorial on UMG and iTween? I didn’t see one in the playlist linked to from the original post. I got it to scale and everything, all I need is that finished event. Thank you :smiley:

:'O I love these animations! They’re so much better than what I had before!

(what exactly should the ONTweenCompleteTarget object be?)

Your OnTweenCompleteTarget can be anything. Are you familiar with blueprint interfaces? On the blueprint you want to execute custom logic when the tween completes, add “iTInterface” in the class settings. This can’t be done on the level blueprint since they don’t support interfaces, but any other blueprint is fine, including your widget blueprint that houses the widget you’re tweening. You can just plug “self” in there if the calling blueprint is the same as the one that should execute the “Complete” logic.

After you’ve added the interface, compile and search up “Event On Tween Complete” in the context menu. From there you can run whatever code you need to.

I hope what I said makes sense, feel free to ask for more clarification if not. I’m really glad you like the animations, I encourage you to experiment with the different easetypes!

I do plan to finish a whole suite of videos in time but right now the paying projects take priority, you know how it is :stuck_out_tongue:

Hmm, alright. I kinda get it. The one thing I’m not familiar with are blueprint functions, go figure x’D

Thank you!

Yeah, I’m using the elastic ease-out one. It works perfect for my chat bubble :smiley:

Hahaha I sure do, I wish you good luck!

I also would like to have this feature… At the moment I just use a delay node which is called after the Play Animation Node, but this only works in the Event Graph and I have to manually know the animation lenght…

Can’t you just do the same I did? Get iTween, the animations are really good O.O

We have an animation end event in UMG. I thought it was in 4.7, it’s definitely in 4.8 :slight_smile: You’ll also be able to get the start/end time of an animation.

Ahhh, I see. Looking forward to it! (although it’s not much of an issue anymore hahaha) Is there a preview coming around anytime this month, if you don’t mind me asking? :3

Hey Nick, I just checked 4.8 and this still doesn’t seem to be present within the graph? You can get the start and end times but no event from what I can see.

You don’t have this node?

Just checked, unfortunately no :frowning:

EDIT: At least from what I can see in this project in 4.8.0 (binary), haven’t tried the new 4.8.1 source someone mentioned was live. Just checked, 4.8.1 I guess isn’t live yet.

Dunno what to tell you, that screenshot it from the 4.8 version I downloaded through the launcher.

Whoops, missed it on the Override Menu, found it.

EDIT: Should I do a simple compare class references to see if it’s a given Animation or is there a better way to go about that? Thanks again Nick!

If its possible, you can restart the animation by playing it again with the loop set to 1, this will make it run once and then stop. Canceling out the infinite loop of the previous time is was started.

If you could fire generic events from UMG animations (like you can in matinee/timeline):

a) you wouldn’t need these extra events
b) you could easily do stuff at certain points during the animation (without having to do a big messy workaround in tick in the Event Graph)
c) Animations would be simpler, a lot less redundancy, less error-prone (for example if you want to hide a whole heap of elements repeatedly in the middle of various animations, you can do it once in blueprint, instead of duplicating the hiding keys through many animations)