I was under the impression Southpaw44 was asking about one specific unit, and in that case the above solution would most likely not fit ( changing the unit type entirely) :p
Plus I couldn't get the tutorial to work (getting was ok, setting wasn't)
I'd like to know as well, you might be able to do it with custom scripts, but the fastest might be to create a duplicate of your unit, make it commandable, and replace the uncommandable unit with it when needed.
I can see how to do both (blocking enemy and trapping) with triggers actually. But, as I am no expert with the data editor, actors and models alike, it would look awful. And it would require some time and debugging, so I was hopping someone else could actually help without the use of triggers ;p
Well, I couldn't manage to fix that in 5 minutes ;D
Apparently the no fly zones are also in the Data Editor under the subsection 'Model', but I am not knowledgeable in models/actors :S
So here's a workaround !
In the location you want the no fly zone, create two regions, on top of each other. One larger than the other.
Call them Small No Fly Region and Large No Fly Region.
What it does: Save the position of any flying unit that enter the large zone, and if they go in the Small zone, they are ported to the previously saved location !
And when you want to get rid of the No Fly Zone, just move the two regions on a point outside the boundaries of the map with Region - Move Large No Fly Region to Point
Hey, I tried to look around, and apparently the no-fly-zone are considered Points but they also appear to have a special addition to them.
So I tried to move the point, attach the point to some units, and kill the units. No effect whatsoever on the no fly path effect of the points. I'll try and take a better look at it tomorrow if no solution has been found. Good luck anyway !
p.s: oh and there's a workaround that could mimic the no fly effect if it's needed, I'll explain it if you can't figure anything else.
@Sholdak: Go
That's wonderful! I was looking for something like that a while back :)
But as I'm just beginning to use custom scripts and Galaxy, I have some questions. When you use CatalogFieldValueSet all the data objects are modified?
I.E If I modify the command card of an unit, it will be modified for all units of the same type, won't it ?
What would one use to modify just one specific unit ?
Plus, when I tried to use one of your example (CatalogFieldValueSet (c_gameCatalogUnit, "Marine", "CardLayouts[0].LayoutButtons[5].Column",1,"1");), I got an error ('ErrorCatalogFielNotWritten').
This might be related to the fact I didn't extract or import any xml file as suggested in the API, but hey, I'm beginning :)
Can't you shape the region in which you spawn your units not to include the problematic cliffs?
In the Terrain Editor, region layer, you can select a specific region and add negative (small checbox) areas to it, in order to give it a complex shape.
Would that fix your problem, or is the matter different from what I understood?
Hey, you should take a look at my tutorial, it might cover your application.
Basically, you would just have to create a constant empty region, add any variable regions you want to it, and manage everything in the Trigger with the constant Region.
I did not try this mechanism with moving regions, so let me know if anything goes wrong !
edit: Oh and by the way, would it be more simple to create an aura on your unit A that kills unit B ? There's a tutorial for auras out there if you need it.
0
@SumDedGuy: Go
Isn't that what you want?
0
@Aenigma: Go
I was under the impression Southpaw44 was asking about one specific unit, and in that case the above solution would most likely not fit ( changing the unit type entirely) :p
Plus I couldn't get the tutorial to work (getting was ok, setting wasn't)
0
@Southpaw444: Go
I'd like to know as well, you might be able to do it with custom scripts, but the fastest might be to create a duplicate of your unit, make it commandable, and replace the uncommandable unit with it when needed.
0
@SaucySC: Go
I just had to answer that :D
I can see how to do both (blocking enemy and trapping) with triggers actually. But, as I am no expert with the data editor, actors and models alike, it would look awful. And it would require some time and debugging, so I was hopping someone else could actually help without the use of triggers ;p
0
@Paranoiks: Go
Yep. Pretty sure someone can.
0
@goofoffjw: Go
Well, I couldn't manage to fix that in 5 minutes ;D Apparently the no fly zones are also in the Data Editor under the subsection 'Model', but I am not knowledgeable in models/actors :S So here's a workaround !
In the location you want the no fly zone, create two regions, on top of each other. One larger than the other. Call them Small No Fly Region and Large No Fly Region.
Then create the two following triggers:
and
and that's it :)
What it does: Save the position of any flying unit that enter the large zone, and if they go in the Small zone, they are ported to the previously saved location !
And when you want to get rid of the No Fly Zone, just move the two regions on a point outside the boundaries of the map with Region - Move Large No Fly Region to Point
Region - Move Small No Fly Region to Point
0
@goofoffjw: Go
Hey, I tried to look around, and apparently the no-fly-zone are considered Points but they also appear to have a special addition to them.
So I tried to move the point, attach the point to some units, and kill the units. No effect whatsoever on the no fly path effect of the points. I'll try and take a better look at it tomorrow if no solution has been found. Good luck anyway !
p.s: oh and there's a workaround that could mimic the no fly effect if it's needed, I'll explain it if you can't figure anything else.
0
@Sholdak: Go That's wonderful! I was looking for something like that a while back :)
But as I'm just beginning to use custom scripts and Galaxy, I have some questions. When you use CatalogFieldValueSet all the data objects are modified?
I.E If I modify the command card of an unit, it will be modified for all units of the same type, won't it ?
What would one use to modify just one specific unit ?
Plus, when I tried to use one of your example (CatalogFieldValueSet (c_gameCatalogUnit, "Marine", "CardLayouts[0].LayoutButtons[5].Column",1,"1");), I got an error ('ErrorCatalogFielNotWritten'). This might be related to the fact I didn't extract or import any xml file as suggested in the API, but hey, I'm beginning :)
Any idea how to fix that ?
0
@Reya: Go
Can't you shape the region in which you spawn your units not to include the problematic cliffs? In the Terrain Editor, region layer, you can select a specific region and add negative (small checbox) areas to it, in order to give it a complex shape.
Would that fix your problem, or is the matter different from what I understood?
0
@b0ne123: Go
already told, and not easier than triggers.
0
@HeroicPrinny: Go
Hey, I just tried to apply my workaround for your case on a test map, and guess what? It was working fine ;D
And it's actually more straightforward than what my tutorial covers:
You just need to define a global variable Region, set it as a constant with an initialization to Empty Region (in the function subcategory).
Then:
and in the Trigger:
And I'm walking around killing marines with a zealot !
Sounds really stupid to use a constant as a workaround for a variable, but, hey, it works :)
As for the aura part, I was thinking of the Bifuu's tutorial as well, so I can't really help more :p
0
@HeroicPrinny: Go
Hey, you should take a look at my tutorial, it might cover your application.
Basically, you would just have to create a constant empty region, add any variable regions you want to it, and manage everything in the Trigger with the constant Region.
I did not try this mechanism with moving regions, so let me know if anything goes wrong !
edit: Oh and by the way, would it be more simple to create an aura on your unit A that kills unit B ? There's a tutorial for auras out there if you need it.
0
@overload119: Go
Just to check, but what level of zoom are you using in the terrain editor?
I found out that zooming out on huge maps can cause the Editor to be extremely laggy, even when just managing the triggers :p
Do you still have any lag when zooming in on the terrain and going on to the triggers?
0
@Logikz0: Go
Change 'Triggering unit' by 'Triggering Progress Unit', this should do the trick ! It's stopping the building process though.
0
I updated the first post with the leaving management; I also have it on a .SC2Map along with the 'Any Unit dies' management if it's needed!
As I said, this mechanism needs testing on a large and complex map, but it wasn't lagging so far (even with the leaving management).