I've seen this done in quite a few maps.
An example would be a reaver attacks a goliath, as soon as the scarab hits the goliath and explodes, it would spawn some wraiths to do additional damage. How is this done? Might not be a good example due to the possibility of just " 2 players bring" blahblahblah. Create wraiths.
Just for a preferance of like, a gaurdian, or a vulture or something.
None.
An artist's depiction of an Extended Unit Death
Moved to the SC1 UMS Assistance forum.
In short, there isn't a straightforward way (that I know, at least).
In order to have a true system that functions off of damage, you'd need to either use a
Virtual HP system or use
EUDs to detect HP. I wouldn't recommend the EUD route unless you have some strict control of units in your map.
Like you already mentioned, there are ways to fake this behavior depending on the scenario, such as detecting when a Scarab is near an enemy unit. If the attacking unit is preplaced, you can use EUDs to detect when they attack based on the Attack Cooldown byte in the unit struct (
more information on unit EUDs).
If you can use a Virtual HP system in your map, that would likely be the most elegant solution to detect through triggers when units are attacked.