[Solved] Making my character blink

Hello. I’d like my character to blink… and it’s tricky! I have a walk and an idle animation. I don’t want him to blink ever time these animations loop, so I have a small blink.png that I put on top of the character. This hides/shows every 3 seconds (and will be random, eventually) for about a quarter of a second, at the right x and y position so that it covers his open eyes. It looks nice, and exactly what I want.

But… the character’s head bobs up and down slightly as he walks, so the blink doesn’t line up quite right if it happens when his head is lower down. I think I’ll probably have to drop the idea unless I make his head the same level at all times, which looks unnatural and stiff, like he’s a puppet held up with string.

I wondered if anyone might have any ideas or techniques that could help. Thank you.


Edit: I might just have him blink during his idle pose. I have it set so that the blink png only shows when he’s at frame 17 (the final frame) AND a timer is > 2.5 seconds. So he blinks at regular intervals, but not ever single time the anim loops. He’ll just have to get watery eyes when he’s walking because the same technique leaves his blinking eyes moving away from him, left behind. I do understand why that is. I can either have the hidden blink travelling with him and showing sometimes, but not always lining up vertically, or have the blink trigger when a certain frame is reached, but the png gets left behind because the conditions are only true for one frame.

I love creative idle animations. It can add whimsy. Like when a character acts impatient or uses a yo-yo. Anything to make the character seem more lifelike. I agree, unless you use separate animations, an overlay might look bad when the character is moving.

I agree, and it’s amazing how adding a blink can bring a character to life. I think I’ll absolutely have NPCs that have whimsical animations, as they stand around talking. I’ve settled for having a blink every 2.5 seconds as an overlay on the protagonist’s idle animation, since there isn’t a way to link my blink sprite object to his head that’s bobbing about as he walks or, at least, a straightforward way.

Hi worriedpixels, I love the character, sooooo cute.

Am I missing something, have you tried using the Sticker extension to ‘anchor’ the eyes where you want them on the face? And then they will go where the character goes? Or the action Put the object around another, which can give more control.

Oops, I just noticed this post is already marked as solved.

1 Like

Thanks Bubble. I hadn’t heard of the sticker extension before, but I’ll check it out. I didn’t know about ‘put object around another’ either, but that looks like I can only have the object in the centre of the player, and I can’t nudge it on x and y to where I want (I can only edit the distance from the centre and the angle).

I ended up just using position x and y to make the blink happen in the right place, using the player character’s x and y, plus or minus however many pixels. I show and hide the blink object quickly, to make it look like a blink, and use a timer to make it happen every 2.5 seconds. I also make sure it can only happen when a certain frame of the animation is reached, so that the blink lines up with my character’s nodding head at just the right time.