This is probably because the barracks and supply depot don't follow the placement rules of the command center where it has to be a certain distance from minerals to be placed. I'm not exactly sure how to fix this without ruining the normal barracks.
You could apply the same placement settings as the command center, but then the player wouldn't be able to place buildings near minerals if you're ok with that.
You could also create a duplicate version of the barracks that is only used by this start mechanism. You should be able to have more than one barracks (just make sure to use the prefix or postfix to label in the editor so you know which one is which). Then have the placement settings of the command center on the special one time use barracks. I believe the placement is based on the footprint.
I would just add a Buff behaviour that uses a Create Unit effect that is validated using an Ennumerate Area validator.
EDIT: Trigger solution Unit - Create 1 Barracks for player 1 at ((Position of (Closest unit to Start Location 001 in (Any units in (Entire map) owned by player Any Player matching Required: Resource (Raw), Resource (Harvestable); Excluded: Missile, Dead, Hidden, with at most Any Amount))) offset by (Distance#) towards 180.0 degrees) using default facing (No Options)
You could use a buff as suggested by DrSuperEvil but with a search that uses a nearby mineral field and the caster of the buff as endpoints for the vector of a persistent with an offset to create the units (basically a data version of the trigger solution provided by tdhsst).
Considering the Create Unit effect has adjustable slack with positioning all you would need to do is throw in a validator to prevent placement within a distance.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I am trying to make players start with 1 CC, 1 Supply Depot and 1 Barrack. That is easy to change in the "Races" tab in the data editor.
The problem is that the structures sometimes spawn among the mineral patches, depending on the map layout. See picture link: http://imgur.com/a/7ZH0y
Any ideas how to make structures ALWAYS spawn on the opposite side from the mineral patches?
This is probably because the barracks and supply depot don't follow the placement rules of the command center where it has to be a certain distance from minerals to be placed. I'm not exactly sure how to fix this without ruining the normal barracks.
You could apply the same placement settings as the command center, but then the player wouldn't be able to place buildings near minerals if you're ok with that.
You could also create a duplicate version of the barracks that is only used by this start mechanism. You should be able to have more than one barracks (just make sure to use the prefix or postfix to label in the editor so you know which one is which). Then have the placement settings of the command center on the special one time use barracks. I believe the placement is based on the footprint.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
I would just add a Buff behaviour that uses a Create Unit effect that is validated using an Ennumerate Area validator.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
You could make a trigger spawn the units/structures opposite of the mineral location but if you only want to stick to Data go with
Trigger solution
Unit - Create 1 Barracks for player 1 at ((Position of (Closest unit to Start Location 001 in (Any units in (Entire map) owned by player Any Player matching Required: Resource (Raw), Resource (Harvestable); Excluded: Missile, Dead, Hidden, with at most Any Amount))) offset by (Distance#) towards 180.0 degrees) using default facing (No Options)
You could use a buff as suggested by DrSuperEvil but with a search that uses a nearby mineral field and the caster of the buff as endpoints for the vector of a persistent with an offset to create the units (basically a data version of the trigger solution provided by tdhsst).
Custom Campaign Initiative | Mapster Community Project: Data Wizards
Starcraft II: Unsung Rebels, a custom campaign for Starcraft II
SC2Saver, a way to create saved games via trigger
Frustrated with the editor and would like answers in real time? Join the SC2Mapster Discord!
Considering the Create Unit effect has adjustable slack with positioning all you would need to do is throw in a validator to prevent placement within a distance.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg