- Joined
- Sep 25, 2013
- Messages
- 717
Hi! I have a lot of triggers in my map that use temporary unit groups. The problem is that many of these specify that the matching unit can not be many different units. For example, if i cast the traitor spell, which in an AOE spell that changes the units ownership to that of the casting unit's, I have specify that the affected units aren't any type of worker, aren't structures or mechanical, aren't heroes, and aren't certain elite units. The way i do this is by using the "and" function multiple times within the temp unit group setup.
Is there a way I can achieve this outside of the matching unit thing, like how you can create a list of conditions normally.
Heres an example:
Is there a way I can achieve this outside of the matching unit thing, like how you can create a list of conditions normally.
Heres an example:
-
Generate Gold
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Set tempUnitGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Farm (Gondor)) or (((Unit-type of (Matching unit)) Equal to Mine Shaft (Dwarves)) or (((Unit-type of (Matching unit)) Equal to Slaughter House (Isengard)) or (((Unit-type of (Mat
-
Unit Group - Pick every unit in tempUnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to Human Priest - Inner Fire (Picked unit)
-
-
-
Custom script: call DestroyGroup(udg_tempUnitGroup)
-
Set tempUnitGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Fishing Ship))
-
Unit Group - Pick every unit in tempUnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to Human Priest - Inner Fire (Picked unit)
-
-
-
Custom script: call DestroyGroup(udg_tempUnitGroup)
-
-