1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

wave attack problem

Discussion in 'StarCraft 2 Maps, Replays, Modding' started by DoSrsCa88, Oct 15, 2011.

wave attack problem

  1. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    I have a problem with the units in the enemy wave spawn. I used points for pathing for the enemy wave units and one big square region covering my base where the waves will attack. The problem is once I get to where my base is if there is none of my units or building nearby they just sit in a specified spot.

    I basically want the enemy wave units to once they get to my base seek out and attack all my units and buildings until there is no more like in Melee games. Any ideas on how to do that?
     
  2. rifT_Theory

    rifT_Theory New Member

    Joined:
    Apr 28, 2009
    Messages:
    126
    Likes received:
    0
    Trophy points:
    0
    From:
    Singapore
    Erm set them on patrol ?
     
  3. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Add a re-occurring trigger that creates a unit group of all idle units owned by the attacking force in the base region, and then create a unit group of all units owned by the player in the base region, and then order the idle units in the first group to attack units in the second group. It probably would be best to not have the entire idle force go after a single player unit. Try to divide up the forces.
     
  4. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    That's fine but what about units that I produce during the match? I won't be able to put them into a group, will I?
     
  5. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    that's why it is re-occurring. It re-creates the group every so often so that new units in the area/old units out of the area are added/removed from the group correctly.
     
  6. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    Oh! so the re-occurring trigger is used for my units as well not just the enemy waves.
     
  7. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    One question.

    If I create two triggers:

    Unit - create 15 baneling for player 2 at (point 2) using default facing (no options)
    Unit Group - Add (last created unit) to Player 2 regular

    Will it add all 15 baneling to the group or just one of the 15 banelings? The unit group is called Player 2 regular if you're unsure.
     
  8. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Did you read the little tooltip for the last created unit value? If I were to guess off of syntax, it would only be the single unit since it doesn't say last created unit group. However, logically, it would make sense if it was all 15 units.
     
  9. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    Is there a way to add a bunch of units at a time instead of one at a time?
     
  10. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Instead of Triggering Unit, try something like Trained Unit.

    For the baneling thing, you could try something like spawning the 15 banelings, grabbing all banelings in a location at the place you just spawned and creating a unit group for these banelings, then adding the unit group you just created to the other unit group.
     
  11. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    That's sounds good. Should be quicker than the way I was doing it. Also I created the a recurring trigger called player 1 trained units for the units I train to be added the group called player 1 units. I got a trigger error though when my map started:

    Trigger error in 'gt_player1trainedunits_func': Event response function 'Event Unit' has no matching event.
     
  12. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    I don't know what it means by event unit has no matching event. Can anyone help? My trigger is basically starts on the event of map initialization and follows a condition to only start it if owner of triggering unit is player 1.
     
  13. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    Then follows with a while loop saying while countdown timer is greater than 0 do the actions that follow. Next is about 6 if else statements for the actions and that's how it ends.
     
  14. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    All the if else statements together basically say that if the ability that created the unit is either Barracks - train, Star-port - train, Command Center - train, Factory - train or Merc Compound - summon units then add the triggering units to the chosen group. I am not sure where to look in the trigger, I need advice?
     
  15. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Either your computer freaked out, or you sent that message far too many times.

    It is referring to one of the functions you used for the Unit variable of one of the actions. You may have somewhere accidentally used the "Event Unit" function instead of the "Triggering Unit" function, which does not work because the Event you used does not specify an Event Unit. It may also be that the event you used does not specify a Triggering Unit and in fact specifies it in some more discrete way, such as the function "Trained Unit."
     
  16. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    So does that mean I have to change the event from map initialization to something to do with units?
     
  17. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Change the event to whenever a unit is trained.
     
  18. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    I am having trouble deciding which to pick for the event. Would it be unit training progress or unit is created for the event? There is nothing else I can see to use.
     
  19. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    If you can't find a way to specify Unit Training Progress as "Complete" or "100%" then go with Unit is Created.
     
  20. DoSrsCa88

    DoSrsCa88 New Member

    Joined:
    May 29, 2010
    Messages:
    162
    Likes received:
    0
    Trophy points:
    0
    Yeah that is the unit training progress but should I leave the unit value as any unit? E.g Unit - Any unit training progress is completed. I suppose it doesn't matter cause Player 1 is the only player with buildings. Player 2 units get's spawned.