Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Create Unit At Location
Create Unit At Location
Dec 30 2009, 7:23 am
By: DavidJCobb  

Dec 30 2009, 7:23 am DavidJCobb Post #1



Let's say I have a location, "LOW GROUND only" (which, as one might expect, only covers Low Ground), centered over a Floor-Substructure cliff on an Installation tileset, and I create three P1 Marines at that location using a trigger.



The left location depicts the outcome one would logically expect: SC would look for any walkable ground covered by that location, and spawn some Marines there.

The right location shows what appears to be the actual problem: SC only checks if the center of the location (shown in red) is walkable, rather than simply checking if there is any walkable ground in the location. The result? It finds that it can't place the units, and it gives errors instead of utilizing some artificial equivalent of common sense and spawning the Marines in the walkable Substructure tiles covered by the location.

Is there any way to...
  • force StarCraft to stop being lazy and actually check the whole location?
  • OR find some other way to spawn units on the closest walkable terrain to some marker (unit) placed on a cliff?

Basically, I have a unit (disable-cloaked Protoss buildings, to be specific) placed on a cliff (actually, a hole in a wall) to mark a spawn point. I want to (basically) be able to center a location on this unit and then spawn Zerg at the closest walkable terrain. I don't care what happens between those two steps, so long as I...
  • Find spawn marker (cloaked 'Toss building)
  • ?????
  • PROFIT Spawn Zerg near that marker

Things that don't work:
  • Centering the location on an air unit (they move around, plus I would still get unit unplaceable errors if the air unit happens to be over unwalkable terrain
  • Fixed locations for spawn (makes it harder to check proximity and dynamically spawn based on that)
  • Making this map on a newer game engine (SC kicks too much ass to give up)
  • Not making a zombie map (I've already gotten a significant portion of it done, I've done too much to stop now)

...Any ideas? I can also upload the map, if anyone cares about it. (The solution, if there is any, is likely map-independent, but whatever helps...)



None.

Dec 30 2009, 8:29 am MeNtAlPaTiEnT Post #2



You could create the units somewhere else, then move them, that way I don't think you'll get the "cannot create units" error message. I'd give it a try.



None.

Dec 30 2009, 8:40 am Kaias Post #3



Starcraft tries to create or move the unit exactly in the center of the location. If there is any implacable terrain in that area that the unit would occupy there, then it doesn't move or create it (unless it is an air unit, of course). However, if it is only a unit that is in the way, then starcraft will check positions counterclockwise in an expanding spiral locked to a .25tile x .25tile grid until it finds a position the unit can occupy.

I didn't read your entire post, unfortunately- I'm too sleep deprived right now.



None.

Dec 30 2009, 8:51 am Pinky Post #4



use burrowed units and have the location center to those. it will be able to spawn them then.



None.

Dec 30 2009, 10:08 am UnholyUrine Post #5



You have mistaken TWO things.

1) SC Always places units in the Middle of the location, regardless of what properties the location has.... Therefore, setting the location to be low ground only doesn't create units at low ground.

2) I'm not 100% sure, but, the Location properties only work as a Condition, not an action... Meaning if the location covers both high and low grounds, and if you've set the location to only high ground, you can detect when units are brought to the high ground by using "X player brings units to Location", since you've set the location to only detect high ground. You can't say create or move units to the same location, and expect the units only to be produced at high ground.

Solution: Create the units at another location (Corner of map), and constantly move these units to your spawn point. Once the spawn point moves to a location that has walkable terrain, all the units will be moved there. If it's unwalkable, then there won't be any annoying unplacable messages...



None.

Dec 30 2009, 4:25 pm Kenoli Post #6



If the center of the building is on walkable terrain it'll be able to spawn units. Otherwise not so much.
For example a building placed like this would work just fine:


Alternatively, you could use burrowed units or some such as spawn point markers instead.



None.

Dec 30 2009, 4:58 pm Sacrieur Post #7

Still Napping

Indeed.

A location's flags only apply to conditions, not actions. It isn't that the location doesn't exist in those areas that aren't flagged - it is that it only reads data from minitile values that correspond to the flags.



None.

Dec 30 2009, 5:34 pm rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Kenoli
If the center of the building is on walkable terrain it'll be able to spawn units. Otherwise not so much.
For example a building placed like this would work just fine:


Alternatively, you could use burrowed units or some such as spawn point markers instead.
Buildings have the advantage of being preplaceable anywhere. If you center a location on a building whose center is in a corner between walkable/unwalkable terrain, I think you can always create units there (in this particular situation). However, if the building is then removed, nothing will be created there, because units will try to be placed in the corner, and they will try to be placed half on unwalkable terrain, causing an error. With the building there, I think they would be displaced (unless moved while the unit has no hitbox).



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

Dec 30 2009, 5:58 pm Kenoli Post #9



Quote
Buildings have the advantage of being preplaceable anywhere. If you center a location on a building whose center is in a corner between walkable/unwalkable terrain, I think you can always create units there (in this particular situation). However, if the building is then removed, nothing will be created there, because units will try to be placed in the corner, and they will try to be placed half on unwalkable terrain, causing an error. With the building there, I think they would be displaced (unless moved while the unit has no hitbox).
Yes, but part of the building will also stick out into the walkable area. That could be a problem if there are narrow hallways or something.



None.

Dec 31 2009, 4:36 am DavidJCobb Post #10



Thanks for your advice, guys :D I slapped some burrowed units onto the ground in front of each wall-hole, and it's working great! :D



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06: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.
[06: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
[06: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?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Zycorax