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.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[2024-4-25. : 7:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Zycorax