Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How EXACTLY does Starcraft determine if...
How EXACTLY does Starcraft determine if...
Sep 18 2009, 6:39 pm
By: LazyCoder  

Sep 18 2009, 6:39 pm LazyCoder Post #1



Does it go by if the center point of a unit is within the rectangle? Or does each unit have a bounding rectangle or oval that Starcraft checks against to see if any part of that rectangle or oval is in the location? Or does Starcraft perform a per pixel search to see if ANY part of it is in the location (not bloody likely).

I need to know this so I can be very specific about a location size. I need to kill some units if they're keeping a building from being spawned, but ONLY if they're keeping it from being spawned. I'm trying to avoid a situation where there are 2+ zerglings, one of which is blocking the building, and another that's not but the location is too big so it kills it anyways.



None.

Sep 18 2009, 6:47 pm Kaias Post #2



http://www.staredit.net/wiki/Inverted_Locations

"A unit is registered as inside a location if any part of the unit is right of the location's left border, left of the right border, below the top border and above the bottom border. Under normal circumstances, of course, this creates a rectangular area that units can enter."

The article is on inverted locations, but it makes the idea clear. Each unit has a collision size, a rectangle, that counts as its area. You can look at this area in Scmdraft by enabling debug and checking show unit collision sizes under the debug tab.



None.

Sep 18 2009, 11:24 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

In SCMDraft, the right and bottom lines actually include themselves. For example, a square location made in SCMDraft (or staredit for that matter) on a 32x32 grid makes a 33x33 pixel location as read by starcraft.



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

Sep 19 2009, 2:01 am Falkoner Post #4



I'm always mad when people say a 0x0 location, IT'S A FRIGGIN' 1X1 PIXEL!

Post has been edited 1 time(s), last time on Sep 19 2009, 4:02 am by Kaias. Reason: removed portion responding to deleted post



None.

Sep 19 2009, 4:04 am Lethal_Illusion Post #5



Quote from Falkoner
I'm always mad when people say a 0x0 location, IT'S A FRIGGIN' 1X1 PIXEL!
I think they're referring to it as a 0x0 square location. A 0x0 square location is the same as a 1x1 pixel location.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07: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
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: anoeth47