After seeing some of your comments, I feel like you can help me on my current map.
I made a map with random terrain generation, and I need to allow ground, water and flying units to move in it, with coherent pathing. With this I mean that ground units can move on generated land but not cross to water, and so on. Currently, the land forms from water.
I thought to use a custom path map consisted of /fly not but ground yes/ on bumps of land. Then, make boats flying units, walking units floating units assuming that /ground yes/ means /float yes/, and flying units any type but having the collision off.
I'll write it here just so I wouldn't be the only who knows.
You can actually detect when a unit is summoned by a spell.
When an effect of ability event starts the ability hasn't yet done anything, but it is inevitable. At that time put a 0-second timer.
This timer will end when the ability has already done its instant effect.
Between those 2 times, any unit that appears on the map is definitely a result of the spell being cast.
You can detect most summoning spells with this method, but the additional spawns of lava spawn don't work, and neither do doom or inferno.
Raise dead does work and so does water elemental.