[Trigger] Please Help

Can anyone tell me why this trigger doesn't work?

  • MyAbility
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to MyAbility
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of MyAbility for (Casting unit)) Equal to 1
        • Then - Actions
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 500.00)
          • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ((Triggering unit) is A structure) Equal to False
                      • ((Owner of (Target unit of ability being cast)) is an enemy of (Owner of (Casting unit))) Equal to True
                • Then - Actions
                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
                • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of MyAbility for (Casting unit)) Equal to 2
            • Then - Actions
              • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 500.00)
              • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 250.00)
              • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Triggering unit) is A structure) Equal to False
                          • ((Owner of (Target unit of ability being cast)) is an enemy of (Owner of (Casting unit))) Equal to True
                    • Then - Actions
                      • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
                    • Else - Actions
              • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Triggering unit) is A Hero) Equal to True
                    • Then - Actions
                      • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 750.00)
                    • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of MyAbility for (Casting unit)) Equal to 3
                • Then - Actions
                  • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 500.00)
                  • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + 250.00)
                  • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • ((Triggering unit) is A structure) Equal to False
                              • ((Owner of (Target unit of ability being cast)) is an enemy of (Owner of (Casting unit))) Equal to True
                        • Then - Actions
                          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
                        • Else - Actions
                  • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • ((Triggering unit) is A Hero) Equal to True
                        • Then - Actions
                          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 750.00)
                        • Else - Actions
                  • Unit Group - Pick every unit in (Units within PrayertotheGdsRange of (Position of (Target unit of ability being cast))) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • ((Triggering unit) is A structure) Equal to True
                        • Then - Actions
                          • Unit - Set life of (Picked unit) to 100.00%
                        • Else - Actions
                  • Unit - Create 1 Dummy - PayerFriend for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
                  • Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Human Paladin - Resurrection
                  • Unit - Create 1 Dummy - PayerEnemy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
                  • Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Human Paladin - Resurrection
                • Else - Actions
Only the first unit casts the ability. The second one does it if the first ability could not be done. Can someone tell me why?
 
Last edited:
do they have locust ability? I encounter errors when using last created unit for units with locust........

but why would you use 2 ressurections that are casted at almost the same time if not exactly at the same time (well there are no waits or whatever so the 2 ressurections will be casted at roughly the same time...) so maybe that's why the 2nd would not cast because the first one will already have ressurected all units around...
 
Yes they have locust.And those abilities are diffrent. One of the revives enemy units and the other revives friendly.

try placing them in a variable.... but maybe you need to use custom script for that because I don't know if you can set them after they are created.... I always encounter when I don't set them into a variable if the units have locust..

or maybe just add the locust ability to them after you ordered them to cast the ability...
 
Top