Subterrain
This topic is locked. You can no longer write replies here.
Sep 1 2010, 4:02 am
By: StarBlue
Pages: 1 2 3 >
 

Sep 1 2010, 4:02 am StarBlue Post #1



Ok, pretty basic, how do you sense units in subterrain? I'm trying to make a spell where if you burrow your zergling, a lurker appears and when you unburrow, it dies. I'm trying to figure out a way to sense when the zergling is in subterrain. Any help?



None.

Sep 1 2010, 4:07 am DavidJCobb Post #2



There's no such thing as "subterrain".

The most common method for burrow detection is:
  • Pre-place a location A in a small enclosure. Pre-place Siege Tanks or other large units such that the enclosure is 100% full, there's no empty space at all.
  • Center location B on Zergling.
  • Move Zergling at B to A.
  • If Zergling is moved successfully, Zergling is burrowed. Move it back to B.

If the Zergling isn't burrowed, it won't fit in Location A (because Location A is full). If it is burrowed, it'll be moved under the Siege Tanks or other units, and thus will fit in Location A. Note that the terrain at location A MUST BE WALKABLE.

EDIT: Constantly moving the Zergling could interfere somewhat... Players will have a hard time selecting it, units will have a hard time attacking/following it, etc..



None.

Sep 1 2010, 4:13 am StarBlue Post #3



no, I mean I saw to be able to run around, and when I burrow, to have a lurker spawn next to me (spell is like an underground attack) and when I unburrow, the lurker dies and I burrow somewhere else, and another re-appears, etc.



None.

Sep 1 2010, 4:16 am DavidJCobb Post #4



Well, that's why the system I came up with puts a location on the ling and moves it back after the test.

1. Move Ling to "Really Full Area"
2. If Ling is at "Really Full Area", set Switch and move Ling back to its original position.
3. If Switch is set, do shit because Ling is burrowed.
4. Clear Switch.

EDIT: Aristo's method, which doesn't break selection/targeting:

Quote from Shoutbox
[12:21 am] HCM�Aristocrat -- 1x1 location, center on ling. move some other ground unit to location
[12:20 am] HCM™Aristocrat -- burrow detection is easy

1. Center a 1x1 location on the ling
2. Move any ground unit to the location.
3. Check if the ground unit is in the location.
4. If the ground unit is NOT in the location, then the ling is unburrowed; it displaced the ground unit.

Hell, you could use the Lurker as the burrow-checking ground unit, and then simply not move it away if it's still in the location (meaning if the ling is still burrowed).

Post has been edited 2 time(s), last time on Sep 1 2010, 4:24 am by DavidJCobb.



None.

Sep 1 2010, 4:25 am StarBlue Post #5



Are zerg eggs unreplacable units?



None.

Sep 1 2010, 4:28 am ImagoDeo Post #6



There is a better method, using a 1 pixel size location constantly centered on the zergling.

The system uses triggers to move a Dark Templar to the ling's centered location. Since the location is 1 pixel in size, therefore the Dark Templar cannot in fact move to the location - sense that it isn't there, and you've detected whether or not the ling is burrowed (more or less). If the Dark Templar is successfully moved to the location, then the zergling is burrowed and you have that information. Whatever the outcome, immediately move the Dark Templar back to where it was originally to prevent any disturbances. Then you can create the lurker temporarily. Be wary of tight spaces that might prevent the Dark Templar from being moved to the Zergling even if it is burrowed - tight spaces like that would also prevent the Lurker from being created.



None.

Sep 1 2010, 4:30 am StarBlue Post #7



yeah... I'm just going to use a diferent method than burrowing, thanks anyways.



None.

Sep 1 2010, 5:19 am DavidJCobb Post #8



Quote from ImagoDeo
There is a better method, using a 1 pixel size location constantly centered on the zergling.

The system uses triggers to move a Dark Templar to the ling's centered location. Since the location is 1 pixel in size, therefore the Dark Templar cannot in fact move to the location - sense that it isn't there, and you've detected whether or not the ling is burrowed (more or less). If the Dark Templar is successfully moved to the location, then the zergling is burrowed and you have that information. Whatever the outcome, immediately move the Dark Templar back to where it was originally to prevent any disturbances. Then you can create the lurker temporarily. Be wary of tight spaces that might prevent the Dark Templar from being moved to the Zergling even if it is burrowed - tight spaces like that would also prevent the Lurker from being created.
Isn't that the method that Aristocrat posted in the shoutbox and that I rephrased here?



None.

Sep 1 2010, 6:48 am CecilSunkure Post #9



Quote from StarBlue
yeah... I'm just going to use a diferent method than burrowing, thanks anyways.
Cmon. Don't be lazy. Just because something is difficult doesn't mean that you shouldn't try it.

There is no trigger for detecting when something is burrowed, so what you have to do instead is detect an effect of burrowing. What effect does burrowing leave? You can move units over the burrowed unit.

To detect when a unit is burrowed, you check to see if you can move another unit on top. Constantly have a location on your zergling (or whatever zerg unit the player controls). Also, constantly try to move another unit (like an egg or something), onto the zergling. You can detect when the zergling is burrowed by detecting when the egg is moved onto the location of the zergling.



None.

Sep 1 2010, 8:04 am StarBlue Post #10



yeah. its not that its difficult, its just that... huh, I really dont know why... I guess I just like creating units to make spells.



None.

Sep 1 2010, 8:07 am CecilSunkure Post #11



Once you detect the burrowed status by moving a unit over the zergling, you can take it away, and then create units to make your spells.



None.

Sep 1 2010, 12:38 pm Aristocrat Post #12



Quote from StarBlue
no, I mean I saw to be able to run around, and when I burrow, to have a lurker spawn next to me (spell is like an underground attack) and when I unburrow, the lurker dies and I burrow somewhere else, and another re-appears, etc.

:facepalm:

StarBlue, please stop making threads asking questions that can be answered by using the "Search" function, then completely ignoring everything we post because you weren't interested in the answers as much as you are in the minerals you get by asking questions.

5 minutes in SCMDraft, and you can get burrow detection to do whatever you want.

(Place a P12 lurker somewhere in the corner of the map in a location called "cage" or whatever. Also make a bunch of burrowed p12 lurkers at a location called "spikes" or something. Make sure they do not overlap.)

Trigger
Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 0 Zerg Lurker
  • Always
  • Actions
  • Center location "1x1" on Zerg Zergling owned by Current Player.
  • Move 1 Zerg Lurker owned by Player 12 at cage to 1x1
  • Preserve Trigger.


  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 0 Zerg Lurker
  • Player 12 brings Exactly 0 Zerg Lurker to cage
  • Player 12 brings Exactly 0 Zerg Lurker to 1x1
  • Actions
  • Move 1 Zerg Lurker owned by Player 12 at Anywhere to cage
  • Preserve Trigger.


  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 0 Zerg Lurker
  • Player 12 brings Exactly 0 Zerg Lurker to cage
  • Player 12 brings Exactly 1 Zerg Lurker to 1x1
  • Actions
  • Move 1 Zerg Lurker owned by Player 12 at Anywhere to cage
  • Move 1 Zerg Lurker owned by Player 12 at spikes to 1x1
  • Give 1 Zerg Lurker owned by Player 12 to Player 1 at 1x1
  • Preserve Trigger.


  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 1 Zerg Lurker
  • Always
  • Actions
  • Center location "1x1" on Zerg Zergling owned by Current Player.
  • Move 1 Zerg Lurker owned by Player 12 at cage to 1x1
  • Preserve Trigger.


  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 1 Zerg Lurker
  • Player 12 brings Exactly 0 Zerg Lurker to cage
  • Player 12 brings Exactly 1 Zerg Lurker to 1x1
  • Actions
  • Move 1 Zerg Lurker owned by Player 12 at Anywhere to cage
  • Preserve Trigger.


  • Trigger
    Players
  • Player 1
  • Conditions
  • Current Player commands Exactly 1 Zerg Lurker
  • Player 12 brings Exactly 0 Zerg Lurker to cage
  • Player 12 brings Exactly 0 Zerg Lurker to 1x1
  • Actions
  • Move 1 Zerg Lurker owned by Player 12 at Anywhere to cage
  • Move 1 Zerg Lurker owned by Player 1 at Anywhere to spikes
  • Give 1 Zerg Lurker owned by Player 1 to Player 12 at spikes
  • Preserve Trigger.


  • Collapsable Box




    None.

    Sep 1 2010, 12:57 pm NudeRaider Post #13

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Aristocrat
    Obviously, there are glitches with this system. Nothing prevents P1 from unburrowing the lurker, and if you give it to an allied computer, the lurker splash damage will hurt the ling. Also made these triggers off the top of my head so might glitch in SC, idk :P
    I'm not sure, but wouldn't disabling burrowing prevent him from unburrowing? (I think there was something about it not working for lurkers though...)




    Sep 1 2010, 1:03 pm Aristocrat Post #14



    Quote from NudeRaider
    Quote from Aristocrat
    Obviously, there are glitches with this system. Nothing prevents P1 from unburrowing the lurker, and if you give it to an allied computer, the lurker splash damage will hurt the ling. Also made these triggers off the top of my head so might glitch in SC, idk :P
    I'm not sure, but wouldn't disabling burrowing prevent him from unburrowing? (I think there was something about it not working for lurkers though...)

    If you disable burrowing, you wouldn't be able to burrow the zergling in the first place, rendering the whole system useless. :P (Setting Burrow to "Enabled" will not disable it for lurkers, since you do not need to research it for lurkers to burrow.)



    None.

    Sep 1 2010, 1:14 pm Azrael Post #15



    Quote from ImagoDeo
    There is a better method, using a 1 pixel size location constantly centered on the zergling.

    The system uses triggers to move a Devouring One to the ling's centered location. Since the location is 1 pixel in size, therefore the Devouring One cannot in fact move to the location - sense that it isn't there, and you've detected whether or not the ling is burrowed (more or less). If the Devouring One is successfully moved to the location, then the zergling is burrowed and you have that information. Whatever the outcome, immediately move the Devouring One back to where it was originally to prevent any disturbances. Then you can create the lurker temporarily.
    Fixed. Why would you use a Dark Templar? Don't.
    Quote from ImagoDeo
    Be wary of tight spaces that might prevent the Dark Templar from being moved to the Zergling even if it is burrowed - tight spaces like that would also prevent the Lurker from being created.
    This is only an issue when you use a Dark Templar. If you use a Devouring One instead, you can no longer get too close to walls or edges for it to break. The system will only screw up if something walks over you while you're burrowed.

    Of course, there are ways to get around this. For one, if the Zergling is in the playing field where other units can pass over it, then you can detect when it burrows to give the Lurker, and detect when it moves to kill the Lurker.

    Another solution is to make it so the Zergling will automatically unburrow when another unit walks above him.

    Yet another possibility is to make it so two Zerglings occupying the same 1x1 area causes the game to separate them. You can make this separation only activate when both Zerglings are burrowed on top of one another.

    The best solution might be a combination of the first two. Once the Zergling burrows, the 1x1 pixel location stops centering on it. When there's no unit above the burrowed Zergling, it continually does a normal unburrow check as illustrated above. When there is another unit at the burrowed Zergling's location, it stops and assumes the Zergling remains burrowed. If at any time the Zergling leaves the 1x1 pixel location, its status is changed to unburrowed.

    The issue I see with this is, if two Zerglings burrow on top of each other, one of them can unburrow and will retain his Lurker until he moves. Still, it shouldn't be a terribly huge concern.

    Post has been edited 2 time(s), last time on Oct 12 2010, 2:21 am by DevliN. Reason: Mineral abuse.




    Sep 1 2010, 1:21 pm Aristocrat Post #16



    Quote from name:Azrael.Wrath
    This is only an issue when you use a Dark Templar. If you use a Devouring One instead, you can no longer get too close to walls or edges for it to break.

    The issue is, StarBlue wants a lurker to spawn where his burrowed zergling is. Therefore, we MUST have a 32x32 empty space to accommodate the burrowed lurker, and hence why we need a lurker for burrow detection.

    Quote from name:Azrael.Wrath
    The system will only screw up if something walks over you while you're burrowed.

    Of course, there are ways to get around this. For one, if the Zergling is in the playing field where other units can pass over it, then you can detect when it burrows to give the Lurker, and detect when it moves to kill the Lurker.

    A few more triggers can fix that. A 16x16 location centered on the zergling will do. If another unit occupies this space, the zergling is still burrowed, even if the lurker does not enter the 1x1 location.

    Quote from name:Azrael.Wrath
    Another solution is to make it so the Zergling will automatically unburrow when another unit walks above him.

    I forgot how to make units unburrow with triggers. Would be nice if you could post the AI script or whatever that's needed for it.

    Quote from name:Azrael.Wrath
    Yet another possibility is to make it so two Zerglings occupying the same 1x1 area causes the game to separate them somehow. You can make this separation only activate when both Zerglings are burrowed on top of one another.

    The best solution might be a combination of the first two. Once the Zergling burrows, the 1x1 pixel location stops centering on it. When there's no unit above the burrowed Zergling, it continually does a normal unburrow check as illustrated above. When there is another unit at the burrowed Zergling's location, it stops and assumes the Zergling remains burrowed. If at any time the Zergling leaves the 1x1 pixel location, its status is changed to unburrowed.

    The issue I see with this is, if two Zerglings burrow on top of each other, one of them can unburrow and will retain his Lurker until he moves. Still, it shouldn't be a terribly huge concern.

    The burrow detection works even if they stack, since it's player-specific.



    None.

    Sep 1 2010, 1:31 pm NudeRaider Post #17

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    To unburrow just order it.

    Create the lurkers already burrowed then you don't need 32x32 space.

    When the players unburrows either the lurker or the ling the burrow detecting will end the spell, however the ling is still burrowed so the spell will recast. Wasted mana is the worst that can happen...




    Sep 1 2010, 1:46 pm Aristocrat Post #18



    The unburrowed lurker stays unburrowed, though... So the spell trigger would move it back on spell but instantly end it again, breaking the lurker. Unless you can somehow burrow with "order" as well.



    None.

    Sep 1 2010, 2:00 pm NudeRaider Post #19

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    When the spell ends the lurker is killed




    Sep 1 2010, 2:02 pm DavidJCobb Post #20



    Quote from Aristocrat
    The unburrowed lurker stays unburrowed, though... So the spell trigger would move it back on spell but instantly end it again, breaking the lurker. Unless you can somehow burrow with "order" as well.
    You can't, but I recall reading somewhere that attacking a Lurker will make it burrow. Of course, I've no idea if this is the built-in per-unit AI or if it only happens for computers, and I don't actually know if it's true.

    One could simply kill the Lurker if it's unburrowed.



    None.

    Options
    Pages: 1 2 3 >
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:38 pm]
    NudeRaider -- Ultraviolet
    Ultraviolet shouted: NudeRaider sing it brother
    trust me, you don't wanna hear that. I defer that to the pros.
    [07:56 pm]
    Ultraviolet -- NudeRaider
    NudeRaider shouted: "War nie wirklich weg" 🎵
    sing it brother
    [2024-4-27. : 6:24 pm]
    NudeRaider -- "War nie wirklich weg" 🎵
    [2024-4-27. : 3:33 pm]
    O)FaRTy1billion[MM] -- o sen is back
    [2024-4-27. : 1:53 am]
    Ultraviolet -- :lol:
    [2024-4-26. : 6:51 pm]
    Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
    [2024-4-26. : 6:50 pm]
    NudeRaider -- Vrael
    Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
    sounds like moisture control is often a pressing concern in your city
    [2024-4-26. : 6:50 pm]
    Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
    [2024-4-26. : 6:49 pm]
    Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
    [2024-4-26. : 6:48 pm]
    Vrael -- On this Topic, I could definitely use some Introductions.
    Please log in to shout.


    Members Online: Oh_Man