- Joined
- Mar 1, 2009
- Messages
- 365
How do i pick all units except peons and heroes and structures
so i can mass order them to attack?
so i can mass order them to attack?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
((Matching unit) is A structure) Equal to False
((Matching unit) is A Hero) Equal to False
((Matching unit) is A peon-type unit) Equal to False
If heroes are (properly) excluded from the move, then the issue is not with your trigger but that your peon units don't have the "worker" classification in the Object Editor.
((Matching unit) is A peon-type unit) Equal to False
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 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)))) to Attack-Move To MMRally[(Player number of (Owner of (Casting unit)))]
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()))])
In JASS (which GUI compiles to on map save) locations (GUI point type) are complex objects with variables holding a reference to them in the form of a handle. JASS has no automatic garbage collector so one must explicitly destroy/remove such complex objects before all references to them are lost. Failing to do this results in a memory leak.i didnt think i had to remove the location, thinking it would just be reset when the player used that same ability repeatedly resetting the location every time.