• 0

    posted a message on UI Info Panel

    @Mugen245: Go

    I believe one example of a name would be "UIContainer/ConsoleUIContainer/InfoPanel/InfoPaneHero/ExperienceBar". This particular element has a type of Progress Bar.

    Once you've used Hookup Standard Dialog Item on that path, you can save the result to a dialog item variable using Last Created Dialog Item, and perform any moves or other operations on it that you want.

    Posted in: UI Development
  • 0

    posted a message on UI Info Panel

    @Mugen245: Go

    For you, I would suggest using the trigger action "Hookup Standard Dialog Item" to get these interface elements as trigger dialog items. Then you can manipulate them using all the other dialog item actions.

    SC2Layout files are a bit more involved and you will need more of a foundation in them before trying this.

    Posted in: UI Development
  • 0

    posted a message on Custom Scripts

    @Mugen245: Go

    If you select a custom script page and look down at the very bottom, there should be a text field called something like "initialization function". This can be used to have a single function of type void() (no parameters) run right when the map starts.

    Just put the name of the function in there. No need for the parantheses or semicolon.

    Posted in: Triggers
  • 0

    posted a message on Region Name

    @Nurdguy: Go

    Oh. Isn't there already a function for that? RegionFromName(string name).

    Posted in: Triggers
  • 0

    posted a message on Custom Scripts

    @Mugen245: Go

    I don't understand. What are you trying to do with this one?

    Posted in: Triggers
  • 0

    posted a message on Region Name

    @Mugen245: Go

    That's all in the DataTable trigger actions.

    Perhaps the easiest way to see it is just to plop a couple of them into a GUI trigger and then view the map script to see what they look like in custom script.

    Posted in: Triggers
  • 0

    posted a message on Custom Scripts

    @Mugen245: Go

    It could be that you are defining DualKill() somewhere below the location of this trigger. Try moving the custom script that DualKill() is in above the trigger that is calling it - that might work.

    Posted in: Triggers
  • 0

    posted a message on Custom Scripts

    @Mugen245: Go

    Obviously I'll need a bit more information than that, haha. What does the script look like, how are you running the script, and what does the error say?

    Posted in: Triggers
  • 0

    posted a message on Temporary, SotIS-Style Shields

    @ItemsGuy: Go

    First of all, there is no such thing as an effect that can modify a maximum vital. There are effects that can modify current vitals by a ratio of the maximum vital, but that isn't what you need.

    You need the behavior with the vital max array. Check my original post - the field is under Unit: Modification, not Behavior: Modification.

    Also not sure how you got to damage responses, but you have no need of those for this.

    Posted in: Data
  • 0

    posted a message on Region Name

    @Nurdguy: Go

    Depending on what you want, there is a more efficient way of doing this. If you only need to look up a region by name, not the name of a region, then you can use DataTableSetRegion(preset scope, string name, region value);

    Then you can find the region by its name using DataTableGetRegion(preset scope, string name);

    Using this method you can lookup regions by name without using a for loop. It's also easier to code. It does not allow you to lookup the string name of a given region though.

    Posted in: Triggers
  • 0

    posted a message on Incremental Temporary Shield + Unit Scale Growth

    @abvdzh: Go

    Never seen this before. Excellent! Could come in handy.

    Posted in: Data
  • 0

    posted a message on Comparing two behaviors

    @zRedFoxz: Go

    Okay, this solution is untested, so I can't guarantee its success.

    -

    Validators can't be used to compare the stack count of two behaviors, but requirements can. You can make a requirement that compares the count of two behaviors.

    Make a dummy behavior to serve as the conduit for this comparison. Give this dummy behavior the requirement in its Requirements field. Apply this dummy behavior first.

    After that, run a create persistent effect. Let's say you want to apply stacks of B. Give this create persistent effect a period count equal to the maximum stacks of A and B. Give it a period effect that applies 1 stack of B.

    Now we need a validator. The validator checks that our dummy comparison behavior is on the unit. Put this validator on the apply B effect.

    -

    Thus, theoretically, the dummy behavior will disable when the number of stacks of B is equal to the number of stacks of A, and the persistent will continue to try to apply more stacks of B, but the validator on the apply effect will stop returning true.

    But I don't know if this will work because I don't know if the validator will include requirement-disabled behaviors, or if the requirement will disable the behavior fast enough to prevent the excess period effects.

    -

    Or you could just use triggers.

    Posted in: Data
  • 0

    posted a message on Incremental Temporary Shield + Unit Scale Growth

    @ItemsGuy: Go

    Your events are no good, because behavior on / behavior off only run when the behavior activates or deactivates on the unit, not when the number of stacks increases.

    In other words, your actor actions are running at 1 stack and 0 stacks, but not 2 or 3 stacks.

    Posted in: Data
  • 0

    posted a message on Temporary, SotIS-Style Shields

    @ItemsGuy: Go

    There are a couple ways to do this.

    Perhaps the simplest would be to make a behavior with a Unit: Modification - Vital Max Bonus that increases the unit's maximum shields, and a modify unit effect with an Effect: Vitals - Change that increases the unit's current shields by the same value.

    If you give the behavior a duration, then the maximum shields will simply decrease when the behavior expires. Any other sources of shields will not disappear.

    -

    A different way would be to use triggers to modify the units maximum and current shields directly. Then after a wait or some other condition is satisfied, reduce the maximum shields by the same amount.

    Posted in: Data
  • 0

    posted a message on Custom Scripts

    @Mugen245: Go

    If the script you want to run is simply another function, like:

    void doStuff() {
       ...
    }
    

    Then you can run it simply by calling the function, like so:

    doStuff();
    

    If you want to run it as a trigger, then the function must return a bool and accept two bool parameters, like:

    bool triggerFunc(bool c, bool r) {
       ...
       return true;
    }
    

    Then you can execute it as a trigger by doing:

    trigger t = TriggerCreate("triggerFunc");
    TriggerExecute(t, true, true);
    

    Alternatively you may add events to it, as with making triggers in the GUI:

    trigger t = TriggerCreate("triggerFunc");
    TriggerAddEventDialogControl(t, c_playerAny, your_dialog_item, c_triggerControlEventTypeClick);
    
    Posted in: Triggers
  • To post a comment, please or register a new account.