Does anyone know a way to trigger a script on asset download? Can't find anything in the docs and don't see an obvious trigger condition for that.
Asset downloads are logged as an entry in reporting log (event asset.download.completed), these are not stored on the Asset entity so you can't target that operation via triggers.
What you could do is have an external integration (e.g. timered function) that queries for downloads via Audit endpoint (https://docs.stylelabs.com/content/4.0.x/integrations/rest-api/audit/endpoints.html) and then you process as needed.
Note: I'm not sure if ALL downloads trigger this event (e.g. mass downloads via UI or downloads via API)