• 0

    posted a message on Stuffing 2 events into one trigger

    If I'm understanding this correctly, the dialog button needs the (Used Dialog Button) = Riflebutton condition and the button press needs to Currentweapon != 1 condition? What you can do is have one trigger call another trigger. (wording may be off as I'm speaking from memory, not looking at the editor):


    Dialog_Button_Pressed Trigger:
    Events:
    Any Dialog Item is Clicked
    
    Conditions:
    (Used Dialog Button) = Riflebutton
    
    Actions:
    Run Switch_To_Rifle trigger and check conditions, do not wait for trigger to finish
    

    Switch_To_Rifle Trigger:
    Events:
    Player Presses 1 key
    
    Conditions:
    Currentweapon != 1
    
    Actions:
    Add Rifle to Unit
    
    Posted in: Triggers
  • 0

    posted a message on Chain Lightning

    There's also the Mutalisk's ability, which is essentially Chain Lightning.

    Posted in: Data
  • 0

    posted a message on questions on gathering resources

    1. Check the behaviors of the Mineral Field unit object. One of the behaviors has a field that will allow you to harvest 2 minerals instead of the standard 5 per harvest.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Conditions and Trigger Lag

    Yes, many triggers with the same event and different conditions will generate lag. Can you not specify the variable in the event? If not, you can create a single trigger with the event and then place a switch statement in the action. Each case of the switch statement would start an action definition. I'm not looking at the editor right now, but it would look something like:

    event
      Any Key is Pressed
    actions
      switch( pressed_key ) //I assume that you can find the key that was pressed in the action.
        case 'left_btn': left_is_pressed()
        case 'right_btn': right_is_pressed()
        case 'forward_btn': forward_is_pressed()
    

    left_btn is referring to your variable and left_is_pressed() refers to the names of action definitions that you define.

    Posted in: Triggers
  • 0

    posted a message on [Trigger] Unit Is Selected
    Quote from ArcadeRenegade: Go

    @Azkit: Go

    if its not working then just set the action to "Any unit is selected by Any Player" and make a condition for it "Triggering Unit = Example_Unit"

    Yes, this is the work-around, however, it still increases lag due to checking every time a unit is selected. It would help on lag if this event was fixed to trigger only when it's supposed to.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Trigger] Unit Is Selected

    The Event "Unit Is Selected" has a field so that it should only activate when a particular unit is selected, however, it will activate for Any Unit no matter what. In the below example, the trigger activates when any unit is selected, not just the Example_Unit.

    Steps to reproduce:

    Global Variable:
    Example_Unit: Marine <Unit>
    
    Trigger:
    Unit Is Selected
    Event
         Unit Selection - Example_Unit is Selected by player Any Player
    Actions
         . . .
    
    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on How to micro drones gathering?

    Change it from targeting an item to targeting a unit. Mineral Fields are considered structures and thus units.

    Posted in: Triggers
  • 0

    posted a message on Is it possible to make something like DotA in SC2?
    Quote from Gxray:

    Yea, its not really "hacking", they're just using the editor in creative ways.

    It's not using the editor in creative ways. It's using the editor exactly how particular functions were intended to be used.

    Posted in: Miscellaneous Development
  • 0

    posted a message on 0 Mineral patch ramp block

    I believe what you need to do is:

    1) Duplicate a Mineral Field unit and Minerals (Mineral Field) behavior.
    2) Make sure that your duplicated Minerals (Mineral Field) is attached to the Behaviors+ field and not the original behavior.
    3) In the duplicated Minerals (Mineral Field) behavior, remove the Carry Resource Behavior field.
    4) Adjust to Amount and Capacity fields to however many times it should take for a worker to remove a particular mineral field.  If the mineral field needs to be mined 20 times before it is removed, then adjust it to 20.
    5) Change the Harvest Amount to 1.
    6) Place your duplicated unit on the map, you only need to place 1 per location.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Anyone else having weird issues?

    I'm scared for downloading the patch now.  I JUST edited all of my units yesterday and it took all day.  -.-'  I was only dealing with triggers and terrain up until yesterday and I'd rather not have to edit the units a second time the day after I edited the units.  :-/

    Posted in: Miscellaneous Development
  • 0

    posted a message on Mech Based AoS needs ideas

    Hack
    Virus
    Trojan
    Firewall
    Repair
    Data Corruption
    Bypass Security
    Critical Error
    Bug(s)
    (System) Restore
    (System) Reboot
    (System) Malfunction
    Overload
    Overheat
    Thread
    Download
    Upload
    Elmo
    Burn
    Melt
    250mm Cannons

    Up to you what these abilities actually do.

    Posted in: Project Workplace
  • 0

    posted a message on Giving a unit more than 31 abilitys

    @Antimatterthunder: Go

    There is also a limit of 32 abilities that can be added to a single command card, so keep this in mind. I found this out the hard way by needing 33 abilities (ONE above the max). You can spread the abilities to the various command cards, however. 3 command cards containing 11 abilities each (33 abilities total) works while 1 command card containing 33 abilities will not work.

    If you find that you still need more space, a suggestion might be to create a do-nothing ability (of type effect-instant) and then have a trigger activate whenever the do-nothing ability is used that will select another (possibly invisible) unit that has high selection priority so you have access to the other unit's command card without deselecting your current unit. When you hit the 'cancel' button, it should deselect the unit so that you're back to your previous unit selection again.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Requirement: Player X

    @Anarcy: Go

    I had a similar issue where I wanted a structure to build based upon the player's race, which they select at start up. The workaround that I used was that I put a research upgrade requirement on every ability. At game initialization, I researched the upgrades for the players depending on their race with a trigger. So for me, I had the requirements "is Terran", "is Protoss", and "is Zerg". For you, you'd need the requirements "is Player 1", "is Player 2", ect.

    Posted in: Miscellaneous Development
  • 0

    posted a message on The Command Center is very glitchy

    @7MM3: Go

    In the data editor, you can turn each individual structure to not display in the fog of war, thus it won't know if there is a building there or not when you go to queue a building. In either case, I believe you can set stacking limits on the build ability, so turning lights off/on is unnecessary.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need help with: Specific unit enters region - Do actions

    @Naim2k10: Go

    If the only reason you won't use if-then-else is because you'll have a giant trigger, then I'd suggest making an action definition for each unit and in the trigger that has the event, make a single switch statement that will call the appropriate action definition. In case you're not familiar with switch statements, they are identical to if-then-else statements, except that they only compare one value - in this case, you only need to compare the unit type of the triggering unit. Here's what it might look like if applied to the Marine and Zergling. Let me know if you have any questions, there are 1 trigger and 2 action definitions:

    Unit Enters Region
        Events
            Unit - Any Unit Enters (Entire map)
        Local Variables
        Conditions
        Actions
            General - Switch (Actions) depending on (Unit type of (Triggering unit))
                Cases
                    General - If (Marine)
                        Actions
                            (Triggering unit) enters for player (Triggering player)
                    General - If (Zergling)
                        Actions
                            (Triggering unit) enters for player (Triggering player)
                Default
    

    Marine Enters
        Options: Action
        Return Type: (None)
        Parameters
            Marine Unit = No Unit <Unit>
            Player = 0 <Integer>
        Grammar Text: Marine enters for player Number
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            ------- Actions related to the Marine
    

    Zergling Enters
        Options: Action
        Return Type: (None)
        Parameters
            Zergling Unit = No Unit <Unit>
            Player = 0 <Integer>
        Grammar Text: Zergling enters for player Number
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            ------- Actions related to the Zergling
    
    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.