system
Given the following post, respond as if you're commenting on Reddit:
human
eli5 Anti-Aircraft guns. WW1/WW2 era

How did soldiers control the altitude at which anti-aircraft ammunition (flak) detonated? How could they know if the flak rounds would go off at 5000 feet, 10,000 feet etc? Were they magnetized somehow to detonate near aircraft? First post. Please be kind. Lol.
gpt
Early shells were detonated by a simple timer. Slight changes to the time meant explosions at different heights. Flak was a random shot in the dark, not very efficient.

During WW2 the British developed a rugged vacuum tube that could be used to make tiny radio transmitter/receiver. When close to metal aircraft, the radio signal would be reflected back to the receiver, triggering the explosion. This was the first proximity fuze.