• 0

    posted a message on Warp In unit and control problem.

    The triggers have built-in events for "Unit is created." If you use this event, you can use the "Last created unit" function to get the unit.

    Posted in: Triggers
  • 0

    posted a message on Data-driven move check?

    Ah, I see. That will be pretty cool to implement.

    The first trigger is only needed with this method (unless you can find a way around it) because of 'Mouse X/Y position clicked in the world'. If you try to call it without first checking for a mouse click event, it explodes in-game.

    Posted in: Data
  • 0

    posted a message on How Laggy Will This Be?

    I don't have a great answer for you, but if I was reading an answer by Nebuli posted here correctly->http://www.sc2mapster.com/forums/development/triggers/69635-resolved-general-how-often-does-sc2-check-events-for/#p6, the triggers would only register 16 of those 200 clicks from any one user due to there being a limit to how many times per second the triggers can be made to check for events. Nebuli's answer applied specifically to using periodic trigger events, so I'm not sure if it's uniform for all trigger event checks.

    Hopefully someone more knowledgeable about this stops by.

    Posted in: Triggers
  • 0

    posted a message on Data-driven move check?

    I can't think of a way this could be done with the data editor, but the triggers already have a Distance Between Points function. Maybe something like:

    isMouseClicked = No Point <Point>

    Mouse Clicked Trigger:

    Event - UI - Player Any Player clicks Right mouse button Down.
    Local Variables - yesMouseClicked = (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world))) <Point>
    Conditions
    Actions
         Variable - Set isMouseClicked = yesMouseClicked
    

    Check Distance Trigger:

    Events - Unit - Any Unit is issued an order to Move
    Local Variables
         Distance = 0.0 <Real>
         TUnit = (Triggering Unit) <Unit>
    Conditions
    Actions
         Variable - Set Distance = (Distance between (Position of TUnit) and isMouseClicked)
         General - If (Conditions) then do (Actions) else do (Actions)
              If - Distance > 5.0
                   Unit - Order TUnit to (Stop) (Replace Existing Orders)
    

    Not sure if this helps/is what you were hoping for. This shouldn't be too laggy.

    Posted in: Data
  • 0

    posted a message on Changin lava color

    Not sure if I completely understand what you want to do, but you can go to Terrain, then to Water and click on "Char2". At the very bottom of the pane you will see "Edit Water" - that is where you can make some changes to its look.

    If the lava type isn't very responsive in the editor, you can change its type to Water and the color changes will be much more immediate and apparent.

    Posted in: Terrain
  • 0

    posted a message on When an E-bay is completed, units gain an upgrade?

    Alright cool, I took a look at your triggers and it turns out the problem is with what I recommended. A slight change fixes it.

    Upgrade Trigger (UPDATED)

    Events - Unit - Any Unit construction progress is Completed
    Local Variables
    Conditions - (Unit type of (Triggering progress unit)) == Engineering Bay
    Actions
         Variable - Modify UpgradeLevel: + 1
         Tech Tree - Set Terran Infantry Weapons Level 1 upgrade level to UpgradeLevel for player (Owner of (Triggering progress unit))
    

    The problem was that the trigger I originally recommended used (Triggering unit), but it turns out that because of the setup with the Any Unit construction progress event, the trigger needed to use (Triggering progress unit).

    Let me know if you need anything else!

    Posted in: Triggers
  • 0

    posted a message on When an E-bay is completed, units gain an upgrade?

    If you set it to increase the upgrade level for the player, it should show up with a 1, 2, 3. Making it display the proper icon might take a little bit more, such as checking to see if the player already has Terran Infantry Armor Level 1 set to 1 so that it can proceed to Armor Level 2 (which would change the icon, I think).

    Posted in: Triggers
  • 0

    posted a message on How to make a proper victory/defeat trigger that works?!

    Based on what you want, I think you can get away with just having two unit groups and a trigger that checks for unit creation.

    PlayerGroupLeaderA = (Empty unit group) <Unit Group>
    PlayerGroupLeaderB = (Empty unit group) <Unit Group>

    For your trigger, you will need to check to see if one of your leader units are created. For example, we'll say that the leaders are a Zergling, Marine, or a Zealot (since I don't know what you're using).

    Event - Unit - Any Unit creates a unit with ability Any or behavior No Game Link
    Local Variables
    Conditions 
         (Unit type of (Last created unit)) == Zergling
         (Unit type of (Last created unit)) == Marine
         (Unit type of (Last created unit)) == Zealot
    Actions
         Player Group - Pick each player in (Active Players) and do (Actions)
              Actions
                   General - If (Conditions) then do (Actions) else do (Actions)
                        If - (Owner of (Last created unit)) == (Player (Picked player) from (Players on team 1))
                        Then - Unit Group - Add (Last created unit) to PlayerGroupLeaderA
                        Else
                             General - If (Conditions) then do (Actions) else do (Actions)
                                  If - (Owner of (Last created unit)) == (Player (Picked player) from (Players on team 2))
                                  Then - Unit Group - Add (Last created unit) to PlayerGroupLeaderB
                                  Else
    

    Then for your defeat thing, it could be another trigger:

    Event - Any unit dies
    Local Variables
    Conditions
    Actions
    General - If (Conditions) then do (Actions) else do (Actions)
         If - (Number of Living units in PlayerGroupLeaderA) == 0
         Then
              Player Group - Pick each player in (Players on team 1) and do (Actions)
                   Actions - End game in Defeat for player (Picked player) (Show dialogs, Show score screen)
         Else
              General - If (Conditions) then do (Actions) else do (Actions)
                   If - (Number of Living units in PlayerGroupLeaderB) == 0
                   Then
                        Player Group - Pick each player in (Players on team 2) and do (Actions)
                             Actions - End game in Defeat for player (Picked player) (Show dialogs, Show score screen)
    

    This should work regardless if it's a 1v1, 2v2, 5v5, etc. since you can always set it up to be team 1 versus team 2.



    Posted in: Triggers
  • 0

    posted a message on Make allied workers harvest from same mineral patch?

    Go into the Data Editor, then go to Abilities and type in 'SCV - Gather' and click on it. On the right hand panel, click on the 'Stats' tab and find '(Basic) Flags'. You should see a little checkbox that says 'Bypass Resource Queue'. If you check that, it should work.

    Found the information from:

    http:www.sc2mapster.com/forums/resources/tutorials/1225-data-mineral-editing-fast-map-style/

    Posted in: Data
  • 0

    posted a message on Extractor/Haunted Gold Mine help

    I think this should do what you're wanting it to do:

    Events
         Game - Map initialization
    x= Local Variables
    => Conditions
    Actions
         Player Group - Pick each player in (Active Players) and do (Actions)
              Actions
                   General - If (Conditions) then do (Actions) else do (Actions)
                        If
                             (Race of player (Picked player)) == Zerg
                        Then
                             Unit - Replace (Choose the vespene geyser from the list) with a Extractor using New Unit's Max vitals
                             Unit - Change ownership of (Last replaced unit) to player (Picked player) and Change Color
                        Else
    
    Posted in: Data
  • 0

    posted a message on Duplicating Terran structures question [Solved]

    Go into the Data Editor, then go to Abilities and type in 'Command Center - Train' and click on it.

    On the right panel, where it says '(Basic) Info - Charge - Count (Use)', the very top one will say Train SCV - SCV. Double click on it, and from here you can edit what it actually does. You can change the button to whatever you want, and then scroll down to the Unit, double click on it and select your custom SCV instead. That should change everything that uses the CC Train ability to create your custom unit.

    Hope this works

    Posted in: Data
  • 0

    posted a message on When an E-bay is completed, units gain an upgrade?

    I did some testing to see how it would work, and I think the following will be better than my first suggestion:

    1 Go into the Data Editor, then find Upgrades and type in "Terran Infantry Armor Level 1" (Or whichever you want to use). On the right panel, scroll down and find "(Basic) Max Level", and change it from 1 to 3 (if you only want three engineering bays max for the player). This is how many times the game will allow the upgrade to be applied in-game, so if it stays at 1, only one Engineering Bay will actually increment the armor for your units.

    2 In Triggers, create a variable, such as UpgradeLevel = 0 <Integer>. This will track the progress for one player (if you have more than one player, make UpgradeLevel an array).

    3 Create a new trigger. This will almost be the same as my previous post, but with a few changes.

    Events
        Unit - Any Unit construction progress is Completed
    x= Local Variables
    => Conditions
        (Unit type of (Triggering unit)) == Engineering Bay
    Actions
        Variable - Set UpgradeLevel = (UpgradeLevel + 1)
        Tech Tree - Set Terran Infantry Armor Level 1 upgrade to UpgradeLevel for player (Owner of (Triggering unit))
    

    4 Create another trigger. This one will check to see if an Engineering Bay is destroyed.

    Events
        Unit - Any Unit dies
    x= Local Variables
    => Conditions
        (Unit type of (Triggering unit)) == Engineering Bay
    Actions
        Variable - Set UpgradeLevel = (UpgradeLevel - 1)
        Tech Tree - Set Terran Infantry Armor Level 1 upgrade to UpgradeLevel for player (Owner of (Triggering unit))
    
    Posted in: Triggers
  • 0

    posted a message on When an E-bay is completed, units gain an upgrade?

    Hi

    I think something like the following will work if you do it with triggers. It might also be possible using the data editor.

    *Events
    -----Unit - Any Unit construction progress is Completed (just type 'construction' and it should bring it up)
    *x= Local Variables
    *=> Conditions
    -----(Unit type of (Triggering unit)) == Engineering Bay
    *Actions
    -----Tech Tree - Set Terran Infantry Armor Level 1 upgrade to 1 for player (Owner of (Triggering unit))
    

    Hope this works

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