• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

One trigger does not occur because of other

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,108
I have 2 triggers here. Hand of Angel trigger does not occur because of Eoric Staff when I own both items at once. Eoric Staff always overwrites Hand.
When I drop Eoric Staff, then Hand occurs.
Why?

  • Hand of Angel
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • damageType Equal to 0
      • onHitCleave Equal to 0
      • (target is A structure) Not equal to True
      • ((Item carried by source of type Hand of Angel) is owned) Equal to True
      • (target belongs to an enemy of (Owner of source)) Equal to True
      • (target is Magic Immune) Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Set TempPoint = (Position of source)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 15
        • Then - Actions
          • Unit - Create 1 Dummy Caster for (Owner of source) at TempPoint facing Default building facing degrees
          • Unit - Add Hand of Angel to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning target
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 35
        • Then - Actions
          • Unit - Cause source to damage target, dealing 1000.00 damage of attack type Hero and damage type Normal
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
      • Trigger - Turn on (This trigger)
  • Eoric Staff
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • damageType Equal to 0
      • onHitCleave Equal to 0
      • (target is A structure) Not equal to True
      • ((Item carried by source of type Eoric Staff) is owned) Equal to True
      • (target belongs to an enemy of (Owner of source)) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Set onHitCleave = 1
      • Set TempPoint = (Position of target)
      • Set TempUnitGroup = (Units within 450.00 of TempPoint matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is dead) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of source)) Equal to True))))
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause source to damage (Picked unit), dealing 3500.00 damage of attack type Hero and damage type Normal
      • Set onHitCleave = 0
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempUnitGroup = null
      • Trigger - Turn on (This trigger)
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Well, it is clear that one of the first 2 conditions of hand of angel is getting broken by eoric staff.Try removing them one by one to find out which condition is having problem with eoric staff.

Also it is hard to tell something (for me) without see what damage system you use.

Edit:Also notice that when your Eoric staff trigger works first you are dealing aoe damage to some units which changes "target" and maybe "damagetype" variables.
 

sentrywiz

S

sentrywiz

Its because the trigger is basically copy-paste of the same trigger.
You check if unit has item twice, in both triggers.
So both triggers occur when your unit has both items.
And since you don't have priority, both try to happen first.

- Use only one trigger
- Use OR condition to check if unit has Hand or Staff items
- You try prioritize abilities. Allow each to happen separately if unit has both items

Example:

  • ai trains units Copy
    • Events
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) has an item of type Hand) Equal to True
          • ((Triggering unit) has an item of type Staff) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Hand) Equal to True
        • Then - Actions
          • Do X
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Staff) Equal to True
        • Then - Actions
          • Do Y
        • Else - Actions
 
Status
Not open for further replies.
Top