by LegacyWeapon
You will need a 1x1 pixel location. You can create one with StarForge or SCMDraft2. It should be a tiny dot (not a grid square). We will call it \"L\".
If we create a unit over a location but the location is not big enough to fit, the unit will still be created but not within the location. We will use this to our advantage by creating a trigger that does the following:
-Create a unit over a 1x1 (pixel) location.
--If the unit is on the location, then the unit is still burrowed.
---Actions to take.
--If the unit is not on the location, then the unit is unburrowed.
---Actions to take.
Please note that a Switch is used. This is to simplify the process for newer people; obviously, (isolated) death counts, score, etc, will still work.
Trigger
Conditions:
¤ Switch 1 is Cleared (To start the chain)
Actions:
¤ Center location labeled 'L' on Unit (the Unit that is being detected as to whether or not it's burrowed) owned by Player at 'Anywhere'
¤ Create 1 Probe (or anything other ground unit) at 'L' for Computer
¤ Set Switch 1
¤ Preserve trigger.
Trigger
Conditions:
¤ Computer brings at least 1 Probe to 'L'
¤ Switch 1 is Set
Actions:
¤ Remove Probe at 'SL'
¤ Actions if the unit is burrowed.
¤ Clear Switch 1
¤ Preserve Trigger
Trigger
Conditions:
¤ Player Comp brings exactly 0 Probes to 'L'.
¤ Switch 1 is Set
Actions:
¤ Remove Probe at Anywhere (or the specificed location close to 'L')