For a map I'm making, whenever a Destroyer (Science Vessel) comes into close proximity with another air unit, it must launch a Torpedo (Scourge). I have no clue how to do this with more than one unit at once, and any help that could be rendered would be much appreciated.
Well if you want it to center on more than one of the same unit i suggest centering and then giving the unit to another player with the same color so then it will center on every one.
How many sci vessels per person?
QUOTE
I have no clue how to do this with more than one unit at once
You can't center the same location on different units, it breaks the laws of physics.
You can however make different locations for in example:
Location P1
Location P2
Each player will have his/her own location that no other player is owner of. Then make a separate trigger for every player to center the corresponding location over the unit of the correspong player.
That is, unfortunately, what I thought would happen.
But using multiple locations sounds good. Could I get an example of such a trigger? Tweaking a basic one for use on different players wouldn't be too hard.
| Trigger |
null| Players: |
| ¤ Player X |
| Conditions: |
| ¤ Always(); |
| Actions: |
¤ CenterLocation(Location X, PX, UnitX);
|
| ¤ PreserveTrigger(); |
| Trigger |
null| Players: |
| ¤ Player X |
| Conditions: |
| ¤ Bring(PY, UnitY, LocationX); |
| Actions: |
¤ Do the launch Tirpedo Thing
|
| ¤ PreserveTrigger(); |
It's quite simple. To know when a air unit gets near a Sci Vessel you have to center a location around the sci vessel and then when the other unit goes into that location then you know that the 2 units are near each other.
This is along the lines of what I had thought out, but just needed some outside input on it as to whether or not it would work.
Anyway, there's another related topic I'd like to hear about. Could this be modified so that, if a Battleship, Dreadnought, or Battlecruiser (basically any Battlecruiser unit, hero or otherwise) goes over land, an invicible Heavy Artillery piece (Siege Tank) is placed underneath, and follows it as it moves? I thought this could work along the same way, but wasn't sure if it could work with many of these units moving around at once.
EDIT: It didn't work.
As in my other explanation you just have to create a following loation for each player's BC.
Now you could do one of 3 things:
1) Always have the tank b moved under the BC. This will create that annoying "Unit not Placeable" when the BC in over unplaceable terrain.
2) Create locations that go over land only and the trigger will only run when the BC is in the locations but this will take a whole lot of locations.
3) Pre-Place a grid of burrowed lings over the whole placeable terrain, and when the burrowed lings are in the location then the BC is over land. You might want to create a separate 1x1 location to follow the BC so that it won't mess up when you are over an edge.
#3 is the most effective.
Yeah, but this map is going to be very close to CCMU in any case - this would push it over the edge. I'm working on ways to make units rarer (eg, more expensive and stronger), but theres still going to be a great deal of units on the map.
The previous help didn't work, I attached the file in my last post if you care to view it. Took me about 5-10 minutes in SCXE, but I'm not too sure about it.