Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Creating units that can only attack; not move
Creating units that can only attack; not move
Mar 3 2009, 9:26 pm
By: euphonic  

Mar 3 2009, 9:26 pm euphonic Post #1



I'm making a map which uses a concept found in the Random Item Defense, April Defense maps, as well as some others, where a unit is created on a beacon and it is "stuck" (aka it can only attack, can't move). I've seen this done with both ground and air units, and it appears to not use the "set doodad state" trigger (though I could be wrong). Any ideas? Thanks.



None.

Mar 3 2009, 9:30 pm Demented Shaman Post #2



I believe you move the units to unwalkable terrain.



None.

Mar 3 2009, 9:30 pm Morphling Post #3



In April Defense he had the lurkers owned by a neutral player or p9-12 with burrowed enabled and then gave them to you with burrowed disasbled. This cause burrowed units not able to unburrow.



None.

Mar 3 2009, 9:34 pm euphonic Post #4



I know the permanently burrow lurker trick (already using it, as a matter of fact). The problem comes when I place air units or movable ground units (ie Hydras, Goliaths, Wraiths, etc). I've tried the move to water or higher cliff, but it's not working with water terrain, null terrain, nor cliff terrain clear across the map. That obviously wouldn't work with air units, anyways, right? I'm honestly not getting how they do it.



None.

Mar 3 2009, 9:45 pm Morphling Post #5



Have a location outside the map by manually changing the coordinates and move units to it. You might want to wait a few trigger cycles so they they have a chance to attack.

Attachments:
Stay still.scx
Hits: 8 Size: 39.01kb



None.

Mar 3 2009, 10:07 pm euphonic Post #6



Thanks Morphling, works great!



None.

Mar 3 2009, 10:15 pm rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

Another inferior way, is to use inverted locations on the unit. An Inverted location is one where the bottom right corner is actually smaller than the top left corner's location. The effect is that the unit is only detected to be in that location if all four corners touch the unit's box. That way, if the unit's box and location size are identical, and the unit moves just one pixel away, the unit is not detected there anymore, and can be moved back to the location. The reason this would be better than morphling's is due to some units who can still move even when constantly moved to an unmovable location, and it won't interfere at all with attacking. Obviously, it's a lot more tedious, and you are limited by locations, whereas morphling's is not. If you're dealing with a small number of units, or morphling's idea doesn't work ideally, this is an option. Otherwise, it sounds like you've got it.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 4 2009, 1:30 am Falkoner Post #8



Note that Mophling's method is the same as what devilesk(Obama) said, except that he said to move it to a location outside the map, this method works slightly better than moving it to invalid terrain, as it creates less lag.

Also note that if you use that method, other units attacking them will have a hard time hitting them, and will miss most of the time, and that they will lose their target on the unit constantly too.



None.

Mar 4 2009, 5:00 am Demented Shaman Post #9



Quote from Falkoner
Note that Mophling's method is the same as what devilesk(Obama) said, except that he said to move it to a location outside the map, this method works slightly better than moving it to invalid terrain, as it creates less lag.

Also note that if you use that method, other units attacking them will have a hard time hitting them, and will miss most of the time, and that they will lose their target on the unit constantly too.
How do you place locations outside the map?



None.

Mar 4 2009, 5:08 am A_of-s_t Post #10

aka idmontie

You manually edit the coordinates (I know you can do this in Starforge, I'm not sure about the current version of SCMD).



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Mar 4 2009, 5:25 am poison_us Post #11

Master has given Dobby a doctorate! Dobby is free!

Take the map size [using 64 in the example], multiply it by 32, and add one [or two for good measure].
Now, go to the location properties and put this number as the left side. Put any number above that for the right side. You can ignore the values of "top" and "bottom".
Your location is now out-of-bounds, and you cannot select it. To delete/edit, you've gotta go to the "locations" folder in the left window thingy and select the location. Unless you haven't clicked anywhere else after making it out-of-bounds.

Example: [64*32=2048+2=2050]
Left= 2050
Right= >2050
Top & Bottom= Whatever you want, it's still outta the map.

Explanation: In 1 "normal" grid square, there are 32 pixels. This means that since there are 64 grids in a 64x64 map, there are 2,048 pixels [32*64] in one line [total there are 2,0482, which is 4,194,304]. Placing the border for the location outside of the 2,048th pixel means that the location will be outside of the map if the map is a 64x64. In the example, it is to the right side of the map.

You could also switch all instances of "left" with the "top" value, and the "right" with the "bottom" values. If you do this, make sure that you use the height of the map if the map is not a square.

EDIT: For other map sizes, use
  • 20--640 [Warning: 20 is only valid for the width of a map]
  • 64--2,048
  • 96--3,072
  • 128--4.096
  • 192--6,144
  • 256--8,192
EDIT 2: This is using SCMD2, names of "properties" and other miscellaneous things may differ, sorry for any inconvenience in that matter. I don't use Starforge.


Post has been edited 2 time(s), last time on Mar 4 2009, 5:36 am by poison_us.




Mar 4 2009, 6:22 am Pigy_G Post #12



I generally just use some super high number like 10,000



None.

Mar 4 2009, 10:20 pm Falkoner Post #13



Yeah, you definitely overcomplicated it poison, I just place it on the side and increase the coordinates a bit, it has to be going to the right or bottom though, left and right don't work
And SCM Draft can modify location coordinates as well as StarForge, however, StarForge also has the option of just dragging the location to the gray area outside the map's window, not just changing the coordinates.



None.

Mar 5 2009, 12:51 am poison_us Post #14

Master has given Dobby a doctorate! Dobby is free!

...Thanks, Falk :<_<: .
I didn't say you had to use these numbers, just that you make sure the borders are over the number of pixels in that direction, and logical [AKA: left is less than right, top is less than bottom].

For some maps, I figured closer to the border the better, because maybe the attempt to move a unit further will increase lag. But as I type this, I realize that's wrong, because SC will probably recognize 100,000,000 being out of bounds as fast as it will 10,000.
:hurr:





Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: anoeth47, pilotshower