Flinch (hurt)
The hurt of the nine game cycles: a quick recoil from a hit, the eyes shut and the arms thrown up to guard the face, back to standing in 0.4 seconds, for a game to play the instant a character takes damage.

Use it in a cartoonOpen it in the block editorThe pack file (JSON)
What it is for
Flinch (hurt) is the hurt of the nine game cycles: the short reaction a game plays the instant a character takes a hit, 0.4 seconds from start to finish, so it can play and clear quickly between other actions without holding up the game.
The principle it shows: slow in and slow out
The recoil snaps in fast, 0.08 seconds, eased so it lands hard right at the end, the way a real flinch does. The return to standing takes four times as long, 0.32 seconds, eased smoothly both in and out, so the character settles rather than snapping back. The quick strike and the slow recovery either side of it are what keep a 0.4-second move from reading as a single flat twitch.
The program, line by line
settings: h = 540, leg = 0.24
when it starts
show the side view
look surprised
at the same time:
— 1:
glide hips 0, left leg 12, right leg 12, left shin 24, right shin 24, left foot 12, right foot 12, head 8, torso 5, left arm 34, right arm 34, left forearm 100, right forearm 100, blink 1 over 0.08 s (out)
— 2:
set dx 0, dy 0
for 0.08 s:
dy follows (h*leg/2*(2 - cos(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) - cos((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180)))
dx follows (-h*leg/2*(sin(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) + sin((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180)))
set dx (-h*leg/2*(sin((12)*pi/180) + sin(((12) - (24))*pi/180))), dy (h*leg/2*(2 - cos((12)*pi/180) - cos(((12) - (24))*pi/180)))
at the same time:
— 1:
glide hips 0, left leg 0, right leg 0, left shin 0, right shin 0, left foot 0, right foot 0, head 0, torso 0, left arm 0, right arm 0, left forearm 0, right forearm 0, blink 0 over 0.32 s (smooth)
— 2:
set dx 0, dy 0
for 0.32 s:
dy follows (h*leg/2*(2 - cos(((12 + -12*smoothstep(min(local/0.32, 1))))*pi/180) - cos((((12 + -12*smoothstep(min(local/0.32, 1)))) - ((24 + -24*smoothstep(min(local/0.32, 1)))))*pi/180)))
dx follows (-h*leg/2*(sin(((12 + -12*smoothstep(min(local/0.32, 1))))*pi/180) + sin((((12 + -12*smoothstep(min(local/0.32, 1)))) - ((24 + -24*smoothstep(min(local/0.32, 1)))))*pi/180)))
set dx (-h*leg/2*(sin((0)*pi/180) + sin(((0) - (0))*pi/180))), dy (h*leg/2*(2 - cos((0)*pi/180) - cos(((0) - (0))*pi/180)))
look normalshow the side view— the move is drawn in profile.look surprised— the face changes to its surprised expression for the whole move.at the same time:— two branches together. The first ramps into the flinch: the hips, legs, shins and feet bend a little, the head and torso tip back, both arms swing up with the forearms bent in to 100 degrees and the eyes shut (blinkto 1), over 0.08 seconds. The second keeps the body's own position worked out from those same angles as they ramp, so the feet do not slide.set dx …, dy …— locks the body's position to match the pose the ramp just reached.at the same time:— the same pair in reverse: everything eases back to neutral, the eyes open again, over 0.32 seconds, with the body's position kept in step as it goes.set dx 0, dy 0— back to standing exactly on the spot.look normal— the face returns to normal.
Written out in full, exactly as the engine prints them:
h*leg/2*(2 - cos(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) - cos((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180))
-h*leg/2*(sin(((0 + 12*sin((min(local/0.08, 1))*pi/2)))*pi/180) + sin((((0 + 12*sin((min(local/0.08, 1))*pi/2))) - ((0 + 24*sin((min(local/0.08, 1))*pi/2))))*pi/180))
-h*leg/2*(sin((12)*pi/180) + sin(((12) - (24))*pi/180))
h*leg/2*(2 - cos((12)*pi/180) - cos(((12) - (24))*pi/180))
h*leg/2*(2 - cos(((12 + -12*smoothstep(min(local/0.32, 1))))*pi/180) - cos((((12 + -12*smoothstep(min(local/0.32, 1)))) - ((24 + -24*smoothstep(min(local/0.32, 1)))))*pi/180))
-h*leg/2*(sin(((12 + -12*smoothstep(min(local/0.32, 1))))*pi/180) + sin((((12 + -12*smoothstep(min(local/0.32, 1)))) - ((24 + -24*smoothstep(min(local/0.32, 1)))))*pi/180))
-h*leg/2*(sin((0)*pi/180) + sin(((0) - (0))*pi/180))
h*leg/2*(2 - cos((0)*pi/180) - cos(((0) - (0))*pi/180))Try this
Take 0.3 seconds to flinch back instead of 0.08. The recoil becomes a slow wince rather than a sudden snap, as if the character is bracing rather than being struck.
In the program:
ramp · over0.08→0.3Bend the forearms only 40 degrees instead of 100. The guard is far smaller, a flicker of the arms rather than throwing them fully up to shield the face.
In the program:
ramp · to.part:forearm:-1100→40
How it differs from Cheer (win) and Fall
Cheer (win) is the opposite reaction, a happy spring rather than a flinch, and it takes three times as long. Fall is a longer, looping reaction for when a character is actually airborne; Flinch (hurt) is the short, one-shot recoil for a hit that does not knock the character off its feet.
Works on
| Body | Moves? | What moves |
|---|---|---|
| 2 legs (a person) | yes | whole body, turns, body, head, arms, legs |
| 4 legs (a dog) | yes | whole body, body, head, front legs, back legs, tail, ears |
| no legs (the monster with no legs) | yes | whole body, turns, body, arms, tail, ears |