order all units to move attack except peons?

Discussion in 'World Editor Help' started by sunshinex3, Oct 6, 2018.

  1. sunshinex3

    sunshinex3 You can change this now in User CP.

    Ratings:
    +4 / 0 / -0
    i want a trigger that picks all units except a few types like peon-type and hero=type and orders those units to move attack.
    Trigger:
    • MM Rally
      • Events
        • Unit - A unit Begins casting an ability
      • Conditions
        • And - All (Conditions) are true
          • Conditions
            • (Unit-type of (Casting unit)) Equal to Command Center (All Players)
            • (Ability being cast) Equal to MM Rally
      • Actions
        • Set MMRally[(Player number of (Owner of (Casting unit)))] = (Target point of ability being cast)
        • Unit Group - Order (Units in (Playable map area) matching ((((Unit-type of (Picked unit)) is A structure) Equal to False) or ((((Unit-type of (Picked unit)) is A Hero) Equal to False) or (((Unit-type of (Picked unit)) is A peon-type unit) Equal to False)))) to Attack-Move To MMRally[(Player number of (Owner of (Casting unit)))]



    This trigger orders all units to move attack even if their peon-type or worker type, which is what i don't know want. why is this i thought the condition here would stop peons from charging but they still charge.
     
  2. AceHart

    AceHart Your Friendly Neighborhood Admin

    Ratings:
    +1,480 / 0 / -0
    For this condition to not select your peons, they would also need to be heroic structures, which is somewhat unlikely.

    As in, you want "and", not "or".
     
    • Like Like x 1
  3. sunshinex3

    sunshinex3 You can change this now in User CP.

    Ratings:
    +4 / 0 / -0
    this trigger works, all units except heroes, structures, and peon-type units are order to attack.(no unit group mem leak)

    Trigger:
    • MM Rally
      • Events
        • Unit - A unit Begins casting an ability
      • Conditions
        • And - All (Conditions) are true
          • Conditions
            • (Unit-type of (Casting unit)) Equal to Command Center (All Players)
            • (Ability being cast) Equal to MM Rally
      • Actions
        • Set MMRally[(Player number of (Owner of (Casting unit)))] = (Target point of ability being cast)
        • Set RallyUnitGroup[(Player number of (Owner of (Casting unit)))] = (Units owned by (Owner of (Casting unit)) matching ((((Matching unit) is A peon-type unit) Equal to False) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A Hero) Equal to False))))
        • Unit Group - Order RallyUnitGroup[(Player number of (Owner of (Casting unit)))] to Attack-Move To MMRally[(Player number of (Owner of (Casting unit)))]
        • Custom script: call DestroyGroup(udg_RallyUnitGroup[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))])
     
  4. Drakethos

    Drakethos Preordered Sc2 ftw!

    Ratings:
    +56 / 0 / -0
    Hiya. Idk if you figured it out or not yet but your problem is that the condition says picked unit, since you are still doing a condition, you need to say matching unit, that is the unit the condition is comparing. Then after conditions have been met you refer to them as picked unit do foo. Hope this helps and that I'm not too late
    Edit : my bad I didn't see that you got it working
     
    • Like Like x 1

Share This Page