Burrow Detection
First off you will need a 1x1 pixel location. You can create one with StarForge. It should be a tiny dot (not a grid square); we will name that 1x1 pixel location "PL".
You can easily create a Pixel Sized location by changing the coordinates of the ending position of the location in SCMDraft 2, as well.
Now have another unit placed elsewhere where it wont interfere with the map. I will use a Zerg Drone in my example. Make a location around it. I'll call it "Recall".
What we are doing is we are constantly moving (teleporting) a unit to a 1x1 pixel location. Since there is also another unit there, it wont be able to move (teleport) there. If it is able to move (teleport) there, that means the unit is burrowed.
- Always.
- Center location labeled 'PL' on Unit owned by Player at 'Anywhere'.
- Move all Zerg Drone for Player Comp at 'Anywhere' to 'PL'.
- Preserve trigger.
- Player Comp brings at least 1 Zerg Drone to 'PL'.
- Actions if the unit is burrowed.
- Player Comp brings exactly 0 Zerg Drone to 'PL'.
- Actions if the unit is not burrowed.
- Always
- Move all Zerg Drone for Player Comp at 'Anywhere' to 'Recall'.
- Preserve trigger.
The order of these triggers matter, so do not change them.
Example Map: Burrow Detection