Staredit Network

Staredit Network -> UMS Showcase -> Burrow Recognition
Report, edit, etc...Posted by Dabbu on 2004-06-11 at 03:58:49
(sorry if this is old news...)

Ever make a map where you have the player command a unit which can burrow and you really wanted to know if it was or wasn't?

Well here is how, it's quite simple, but NOT 100% foolproof. Trying to achieve that 100% may be possible.. but it's not worth the extra time/triggers

Basically we have a buoy which we move back and forth, if the unit is burrowed the buoy will be able to step on a small location (16x16) which follows the host, otherwise it won't step on it and we know the unit is unburrowed.
We can take into account units that go over top the unit as it's burrowed, but it becomes impossible to tell that when the unit over top can potentially also be burrowed.

Basically you can always tell when your unit burrows, but it's not always easy to tell when the unit unburrows, which is why you should make it have some sort of action or special burrow ability which will ultimately result in it unburrowing.

Example:
For one of my maps I have a defiler which has a % chance to get a broodling when it burrows, it unburrows automatically.

The map provides the bare minimum you need, and also features the oil rig type terrain smile.gif, enjoy.


Tip: There is a small difference between create and move. Create will place burrowed units around an normal unit as if they took up space. Move will move burrowed units under other units. Also to avoid a nasty ERROR PLACEMENT MESSAGE you should pre-create units in an separate area of the map, then try to move them to where you want them.
Report, edit, etc...Posted by Tuxedo Templar on 2004-06-11 at 05:10:30
Nice. I'd say about every second (~12 hyper trigger activations) do the burrow check on said unit by placing the other unit at it's location, and it should be efficient enough for most, say, rpg purposes (so long as the checking unit is removed within the same hyper activation stage it was created).

BTW, post this in the experimental maps folder, and maybe write it as a tip for the Did You Know... thread. I could actually use something like this, believe it or not. biggrin.gif
Report, edit, etc...Posted by .Coko[CK] on 2004-06-11 at 06:24:51
So basically it is a check to see if units are burrowed, and if not then you can't move the object in question over it, and if they are you can, and then you move it out asap. Would need a blocking condition to stop constant repeat so it only happened when you wanted it to, or over time. Nice idea.
Report, edit, etc...Posted by Clokr_ on 2004-06-11 at 07:14:23
heh, I really like that method, good idea. You can use it for other proposes, like for check if a building is in transit.
Report, edit, etc...Posted by Tuxedo Templar on 2004-06-11 at 09:08:09
Um, you can check that anyway just by using air only location. tongue.gif
Report, edit, etc...Posted by Nozomu on 2004-06-11 at 11:28:44
I think DarkVision showed us something very similar back at BlizzForums. Nice work with the sample map!
Report, edit, etc...Posted by Dabbu on 2004-06-11 at 12:29:56
Goodie, I was starting to think people don't download these sample maps. I spent more time on the oil rig terrain that I did the triggers smile.gif...
Report, edit, etc...Posted by EzDay281 on 2004-06-11 at 14:22:54
And I can understand why.
Good work Dabbu, don't know why I didn't think of it myself(or anyother person who understands triggers, and very basic logic for that matter =D).
Report, edit, etc...Posted by Vindexus on 2004-06-11 at 20:34:57
good work, it's amazing this has gone for so long without anyone noticing. You should submit this to the Downloads section.
Next Page (1)