☀️ Tank lessonshow our diep.io tanks do what they do
Lesson 04

Parts that pump

A wing or a leg that moves is a barrel firing a harmless speck, because every barrel that fires slides back on the shot.

What you see

Two wings that beat while you hold fire, one up while the other is down. There is no animation system in the editor. There is only recoil: every barrel that fires slides back along its own axis on each shot, and that slide is the whole animation.

The trick

Each wing is a barrel that fires a tiny speck, so it slides back and forthfires a tiny speck......and kicks back:a flapwings are barrels: every shot slides them back

Draw the wing as a barrel, then make it fire something nobody will notice: a White speck with almost no damage, size or lifetime. Hold fire and the wing pumps at the barrel's reload rate. Put Fire delay 0.5 on its partner and the pair alternates.

Two conditions, learned the hard way:

Numbers that matter

Speck fieldValueWhy
Damage, Penetration0.01, 0.2So it hurts nothing and dies on contact
Bullet size, Bullet speed, Lifetime0.15, 0.1, 0.1 sA dot that vanishes at the muzzle. White specks read as sparkle
Recoil, Knockback0, 0So the wing beats do not push the tank around
Reload0.5Beat rate: lower is faster, and costs more budget
Fire delay0 and 0.5The pair alternates; 0.25 steps four legs round

Gotchas

Where we used it

Rattlebones: a chattering jaw
Rattlebones: a chattering jaw
Poltergeist: flailing arms and a rattling chain
Poltergeist: flailing arms and a rattling chain
Frankensmash: brows that twitch
Frankensmash: brows that twitch