Azrooh
New Member
- Reaction score
- 5
...The title's a bit of a mouthful. But hopefully these triggers will explain it:
What I'm trying to do here is cause a dummy to cast Parasite on every unit that's near a unit in the unit group PlagueGroup.
This trigger doesn't work, but I think I'm on the right track. How would I fix it?
Trigger:
- Plague
- Events
- Time - Every 0.25 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Coughing Plague) Equal to True)) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is in PlagueGroup) Not equal to True
- Then - Actions
- Unit Group - Add (Picked unit) to PlagueGroup
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in PlagueGroup and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is in PlagueGroup) Equal to True
- Then - Actions
- Region - Center PlagueIncubationRegion <gen> on (Position of (Picked unit))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Coughing Plague) Equal to True)) and do (Actions)
- Events
Trigger:
- Plague 2
- Events
- Time - Every 0.25 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in (Units in PlagueIncubationRegion <gen> matching (((Matching unit) is in PlagueGroup) Not equal to True)) and do (Actions)
- Loop - Actions
- Set DiseasePoint = (Position of (Picked unit))
- Unit - Create 1 PlagueDummy 5 for Neutral Extra at (Center of (Playable map area)) facing Default building facing degrees
- Unit - Order (Last created unit) to Neutral - Parasite (Picked unit)
- EGUI Leak - Remove DiseasePoint
- Unit - Remove (Last created unit) from the game
- Loop - Actions
- Unit Group - Pick every unit in (Units in PlagueIncubationRegion <gen> matching (((Matching unit) is in PlagueGroup) Not equal to True)) and do (Actions)
- Events
What I'm trying to do here is cause a dummy to cast Parasite on every unit that's near a unit in the unit group PlagueGroup.
This trigger doesn't work, but I think I'm on the right track. How would I fix it?