How to make two units unable to be built near

Posts: 16
I'm wondering if it's possible to make two units unable to be constructed near another unit. Much like how a Command Center is unable to be built near resources.
Reply Quote
Posts: 16
Oh and if anyone knows how to disable an ability unless a certain building is near that would be amazing. Thank you for anyone's help.
Reply Quote
Posts: 130
Well, the inability to place a command center near resources is done with footprints. The footprints used for resources mark several tiles around them as "near resources" and the command center can't be built overlapping tiles marked as near resources, also because of the settings in its footprint.

The trouble is, you can't necessarily use this mechanism for arbitrary purposes, because there are only a finite number of designations (unless there's some way to define new ones, but I believe there is not) a footprint can apply to tiles, and all of them have a specific intended purpose. Depending what you are or aren't doing in your map, you may be able to use one of these tile designations outside its intended purpose.

For instance, if you're making an arcade map that doesn't use normal sc2 resource harvesting mechanics, you could use the "near resources" designation. "Resource Drop Off" appears not to have a purpose besides preventing resources from being placed too close to a command center, which is not generally a runtime concern, so you can most likely use it. "No Burrowing" could be usable, especially if your map excludes burrow, but you may be able to configure burrow abilities to ignore this designation anyway. You probably won't be able to get past the inherent functions of any of the other ones.
Reply Quote
Posts: 16
Thank you so much for the quick response. I will take your response into consideration while I see how else I can approach this.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Explain (256 characters max)