• 0

    posted a message on Make unit focus-fire specific categories of enemies

    Hello,
    for my mod I need to be able to make some of the units prioritize certain types of targets, e.g. Massive units or Armored units.
    In other words, the unit should still be able to attack any regular target, but if a prioritized target is nearby, it should focuse-fire it.
    Right now the best solution I can come up with is a trigger that cycles repeatedly over the unit group and checks whether any enemy unit near them has the corresponding attribute, and then issues an order to attack that unit. 
    This solution feels somewhat ugly to me, so I thought maybe someone here could suggest a better option.
    Thank you! 

    Posted in: Triggers
  • 0

    posted a message on [Solved] How to restrict player race choice in mod?

    Wow, never knew this even existed! And it allows a lot of tweaking too, like change the starting units for a race etc.

    As for my specific problem, this semi-worked - the drop-down in the lobby still lists all races, but regardless of the choice it now switches player to Terran before map initialization.  

    This will most definetly suffice for me, so I'll mark this as solved, but the question of wheter it is possible to exclude the races from the lobby remains for now:)

    Thank you!

    @AlexO6 - was that a race joke?

    Posted in: Triggers
  • 0

    posted a message on [Solved] How to restrict player race choice in mod?

    Thanks for the answer!

    To have that option would be really nice, but as I've (probably a bit too subtle) mentioned, I'm dealing with an extension mod here, not a map.  

    As far as I can see it doesn't even have "Game Variants" available at all, only "Game Attributes". A shame, really, would've solved all my troubles:(

    Posted in: Triggers
  • 0

    posted a message on [Solved] How to restrict player race choice in mod?

    Let's say I want to make my mod only available for Terran for now, what is the best way to exclude Protoss and Zerg from the game?   

    Of course the best option would be to tweak the lobby drop-down, but in case this is impossible I'd be satisfied with just changing all player's races to Terran when the game starts. I'm not sure how to do that either though:D

    Thanks!

    Posted in: Triggers
  • 0

    posted a message on [Solved] How to attach dialog to unit?

    Seems like the problem was in the attachment point. When I changed it to 'Center', all worked out nicely.

    Posted in: Triggers
  • 0

    posted a message on How to unload a unit from a "bunker" using triggers [Solved]

    I've just tested the Order With no Target for unloading bunker and it woks perfectly. My suggestion is to check whether the unit that you issue order to is indeed a bunker.  

    It's not clear what "Building" is from your screenshot, but "Attacking Unit" does not look like a bunker at all, as the bunker itself does not attack (unless you've changed it).

    You can kind of debug it using "Text Message" with "Name of Unit Type" just to be sure.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Construction progress is Cancelled does not fire

    Thanks, that kinda worked. Looks like cancelling construction does not actually "cancel progress", it simply kills the unit being constructed, which is good enough:)

    Posted in: Triggers
  • 0

    posted a message on [Solved] How to attach dialog to unit?

    Obvious way (via Attach dialog to unit action) doesn't seem to do anything at all. Probably missing something very simple here.

    Attaching text tag works fine, but text tag sadly lacks some nice features, like pictures etc:(

    UPD: Debug output says "could not get 'ids.Count()>0' from parameter in 'sDialogSetPositionRelativeToUnit'"

    Posted in: Triggers
  • 0

    posted a message on [Solved] Construction progress is Cancelled does not fire

    So I've set up a trigger for the Any Unit Construction progress is Cancelled event. Hovewer it does not seem to react at all when Terran construction is cancelled, and I've no idea as to why.  

    Similar event for the Training progress works nicely; also if I replace Cancelled with Started it also works as expected. Also Unit Dies event fires when the construction is cancelled and the structure is destroyed, but I don't know how to tell if this was due to cancell or if the structure got killed.

    Posted in: Triggers
  • 0

    posted a message on Production queue event?

    Can't find a way to make a trigger react to adding a unit to the production queue. There is a "Training progress" event, but it only fires when the actual production starts.  
    Also "EventUnitOrder" sounds promising, but it requires a specific order and I can't make it react to "Train X" in general. If there is a way to generalize an event somehow that would be epic though.  
    Thanks for any help anyway!

    Posted in: Triggers
  • 0

    posted a message on How to add custom property to units?

    OK , I figured out the way to do it via the data table, not too pretty but simple enough - concatenating UnitTag with some arbitrary property name yields a key for the table.  

    As for the UI, TextTag attached to the unit will do for now:)

    Also I just realized that I probably shoud've posted this in "Triggers", sorry for that:/

    Posted in: Data
  • 0

    posted a message on How to add custom property to units?

    Hi, I'm extremely new to the SCII scripting/modding, so the question is probably somewhat dumb, but I couldn't figure this out.   

    What I need is to attach a custom variable to some units, pretty much like another life/shields/energy thing, just my own.
    Hopefully this is possible to do with a script for a number of existing unit types at once, e.g. for all structures or something like that?   


    Thaks a lot!

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