order all units to move attack except peons?

sunshinex3

You can change this now in User CP.
Reaction score
7
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.
 

sunshinex3

You can change this now in User CP.
Reaction score
7
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()))])
 

Drakethos

Preordered Sc2 ftw!
Reaction score
56
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
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top