Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Prevent Start Locations from removing units?
Prevent Start Locations from removing units?
May 11 2010, 1:37 am
By: Aristocrat  

May 11 2010, 1:37 am Aristocrat Post #1



When I place a start location and set the player's race to Random, units preplaced on the start location (and an unspecified region around it) are removed, so I cannot preplace comsat stations and remove them for Neutral to give Terran players a comsat next to their CC to start with. When I create locations near each start and create comsat if current player brings one CC to anywhere, it doesn't create for players in the top half of the map while it fires for players at the bottom. What's up with that?

Knowing any of the things below will help solve the problem:
-How to prevent units near a start location from being removed.
-How to fix comsats not being created.
-Can addons be moved with triggers? Will they reattach?



None.

May 11 2010, 6:31 am NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

- It's not units near a start location. It's all units for that player if you set him to user select.
- You simply can't.
- Yes and yes.

The best solution is to preplace them for P12. Placed at the right spot they should automatically attach to any CC. Remove the P12 comsats that remain unused after a few seconds. (Not sure how fast the ownership change by attaching is, but you can easily test it.)




May 11 2010, 9:29 am Lanthanide Post #3



Units placed as unit sprites for particular players will survive User Select race.

You'd need to experiment exactly how that worked with add-ons though, as unit sprite add-ons can't be in an attached state like regular addons are. So for add-ons it'd probably be better go with P12, and rather than waiting "a few seconds" just check if player commands at least 1 building and at most 0 CC, that means they must be zerg/protoss, and you can remove the comsat by centering a location large enough to include the comsat on [buildings] owned by that player and remove the comsat.



None.

May 11 2010, 10:01 am StarBlue Post #4



I say just make a nuetral on right next to it and problem solved. If the player isn't terran they could just destroy it on their own. BUT, a good way to do it is to make a trigger:
-CONTIDTION- Current player commands at least 1 terran command center

-ACTION-Create one comsat station for current player at location

That trigger will allow you tp have more freedome when making a map, so it won't be in tha way if you end up being zerg :) I hope that helps.



None.

May 11 2010, 10:31 am Aristocrat Post #5



Quote from NudeRaider
- It's not units near a start location.

Yes, it is. Units near a start location get removed even if not belonging to the player.

Quote from Lanthanide
Units placed as unit sprites for particular players will survive User Select race.

You'd need to experiment exactly how that worked with add-ons though, as unit sprite add-ons can't be in an attached state like regular addons are. So for add-ons it'd probably be better go with P12, and rather than waiting "a few seconds" just check if player commands at least 1 building and at most 0 CC, that means they must be zerg/protoss, and you can remove the comsat by centering a location large enough to include the comsat on [buildings] owned by that player and remove the comsat.

I *did* do exactly that, but P12 comsats placed exactly at where they should be are removed on map start, as I said in the OP.

Quote from StarBlue
I say just make a nuetral on right next to it and problem solved. If the player isn't terran they could just destroy it on their own. BUT, a good way to do it is to make a trigger:
-CONTIDTION- Current player commands at least 1 terran command center

-ACTION-Create one comsat station for current player at location

That trigger will allow you tp have more freedome when making a map, so it won't be in tha way if you end up being zerg :) I hope that helps.
Quote from Aristocrat
When I create locations near each start and create comsat if current player brings one CC to anywhere, it doesn't create for players in the top half of the map while it fires for players at the bottom.




None.

May 11 2010, 10:38 am StarBlue Post #6



Maybe you should just give them the required minerals, and set the unit availability at YES in the unti settings, and if anyone tries to do something else with the money, destroy whatever they make and give them back that minerals untill they have a comsat station. XD

EDIT:
I have an idea :D Try putting a nuetral comsat station a small distance away, that way you can lift the command center and land it right next to it. Won't work if you have a FASTEST map though, in that case I have no idea.

Post has been edited 1 time(s), last time on May 11 2010, 10:56 am by NudeRaider. Reason: merged posts



None.

May 11 2010, 11:30 am NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Ah now I know the problem, I had to make a testmap to get behind of it. Yeah there's a small space around start locations that has of course be kept free of units to create the main building and 4 workers, so there's no way to prevent those units to get removed.
You have to place the comsat 1 tile away and then move it at map start. But keep in mind the player will still have to land manually for the addon to be attached.

Quote
it doesn't create for players in the top half of the map while it fires for players at the bottom. What's up with that?
From your description I'd assume it's because comsats are not symmetric. For example you can preplace a comsat left of a start location but not right of it (with no space between them). Move your location 16 pixels (0.5 tiles) to the right to get the comsat in its correct place for those that would usually create an error.

EDIT:
After fiddling around with it a bit I found a solution: (at least if you have no resources too close to the starting location)
At map start you create a comsat 16 pixels right of the start location, then remove the CC and recreate it. The comsat will automatically attach.
Check the attached example map if anything is unclear.

Attachments:
test.scx
Hits: 1 Size: 27.3kb

Post has been edited 1 time(s), last time on May 11 2010, 11:42 am by NudeRaider.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
Please log in to shout.


Members Online: Roy