Burrow Detection

From Staredit Network Wiki
Revision as of 23:35, 20 March 2015 by DevliN (Talk | contribs) (1 revision imported: Restoring SC1 backup)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

StarCraft Trigger [template]
Players:
Conditions:
  • Always.
Actions:
  • Center location labeled 'PL' on Unit owned by Player at 'Anywhere'.
  • Move all Zerg Drone for Player Comp at 'Anywhere' to 'PL'.
  • Preserve trigger.

StarCraft Trigger [template]
Players:
Conditions:
  • Player Comp brings at least 1 Zerg Drone to 'PL'.
Actions:
  • Actions if the unit is burrowed.

StarCraft Trigger [template]
Players:
Conditions:
  • Player Comp brings exactly 0 Zerg Drone to 'PL'.
Actions:
  • Actions if the unit is not burrowed.

StarCraft Trigger [template]
Players:
Conditions:
  • Always
Actions:
  • 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