• 0

    posted a message on Kill All Units | Trigger Help |

    @SumDedGuy: Go

    Enter Region ITSATRAP 
        Events
            Unit - Any Unit Enters Region ITSATRAP
        Local Variables
        Conditions
        Actions
            Unit Group - Pick each unit in (Any units in Region THEYLLBEBACKORNOT owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
    

    Isn't that what you want?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Remove Uncommandable Flag via trigger??

    @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)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Remove Uncommandable Flag via trigger??

    @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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on A force field letting ally units to go trough

    @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

    Posted in: Miscellaneous Development
  • 0

    posted a message on A force field letting ally units to go trough

    @Paranoiks: Go

    Yep. Pretty sure someone can.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Removing No Fly Zones by Triggers

    @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:

    Enters Large Region
        Events
            Unit - Any Unit Enters Large No Fly Region
        Local Variables
        Conditions
            ((Triggering unit) uses Fly mover) == true
        Actions
            Unit - Set (Triggering unit) custom value 0 to (X of (Position of (Triggering unit)))
            Unit - Set (Triggering unit) custom value 1 to (Y of (Position of (Triggering unit)))
    

    and

    Enters Small Region
        Events
            Unit - Any Unit Enters Small No Fly Region
        Local Variables
        Conditions
            ((Triggering unit) uses Fly mover) == true
        Actions
            Unit - Move (Triggering unit) instantly to (Point((Custom value 0 of (Triggering unit)), (Custom value 1 of (Triggering unit)))) (No Blend)
            Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
    

    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

    Posted in: Miscellaneous Development
  • 0

    posted a message on Removing No Fly Zones by Triggers

    @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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Triggers] CatalogFieldValueGet / Set

    @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 ?

    Posted in: Tutorials
  • 0

    posted a message on Random Spawn and Cliffs (include pathing blockers.) [Solved]

    @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?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Unit enters region - simple question

    @b0ne123: Go

    already told, and not easier than triggers.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Unit enters region - simple question

    @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:

    Region - Add a Positive circle centered at (Position of Zealot [23.45, 22.53]) with radius 2.0 to Main Region
    Region - Attach Main Region to Zealot [23.45, 22.53] with offset (Point(0.0, 0.0))
    

    and in the Trigger:

    Main Region
        Events
            Unit - Any Unit Enters Main Region
        Local Variables
        Conditions
            (Unit type of (Triggering unit)) == Marine
        Actions
            UI - Display "YaAaRRRR" for (All players) to Subtitle area
            Unit - Kill (Triggering unit)
    

    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

    Posted in: Miscellaneous Development
  • 0

    posted a message on Unit enters region - simple question

    @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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Why is GE so slow?

    @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?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Swap buildings

    @Logikz0: Go

    Change 'Triggering unit' by 'Triggering Progress Unit', this should do the trick ! It's stopping the building process though.

    Posted in: Galaxy Scripting
  • 0

    posted a message on [Trigger] Unit enters (Variable Region)

    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).

    Posted in: Tutorials
  • To post a comment, please or register a new account.