• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Trigger conflicts

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
Hey I was wondering since in both these triggers the variable DamageDealt is used but they both have different values if that would cause a conflict or error in them
  • Precision Aura
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Set loc = (Position of GDD_DamageSource)
      • Set DamageDealt = (GDD_Damage x CriticalMultiplier)
      • Set CriticalMultiplier = 2.00
      • Set DamageDealt_Copy = (GDD_Damage x CriticalMultiplier_Copy)
      • Set CriticalMultiplier_Copy = 3.00
      • Set DamageDealt_Copy_2 = (GDD_Damage x CriticalMultiplier_Copy_2)
      • Set CriticalMultiplier_Copy_2 = 4.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L1) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • -------- Turn on Turn off creates an anti infinite loop stoping the damage from exponentially multiplying --------
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L2) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L3) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy_2 - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy_2)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation (udg_loc)
  • Strategic Strike Copy
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamageSource has buff Strategic Strike ) Equal to True
    • Actions
      • Set DamageDealt = (GDD_Damage x 2.00)
      • Set loc = (Position of GDD_DamageSource)
      • Set chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • chance Less than or equal to 30
        • Then - Actions
          • -------- Turn on Turn off creates an anti infinite loop stoping the damage from exponentially multiplying --------
          • Trigger - Turn off (This trigger)
          • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
          • Trigger - Turn on (This trigger)
          • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        • Else - Actions
      • Custom script: call RemoveLocation (udg_loc)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Between those triggers, they won't conflict. Since the triggers enter a que, and you turn the trigger off and on before dealing triggered damage, they won't fire in between each other either.
Thanks and sorry to ask but I've been working on this damn critical strike aura for ages now and I just can't seem to get it to work it doesn't show my floating text so I can't tell if it dealt the desired damage or not...its just been driving me insane.
  • Precision Aura
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Set loc = (Position of GDD_DamageSource)
      • Set DamageDealt = (GDD_Damage x CriticalMultiplier)
      • Set CriticalMultiplier = 2.00
      • Set DamageDealt_Copy = (GDD_Damage x CriticalMultiplier_Copy)
      • Set CriticalMultiplier_Copy = 3.00
      • Set DamageDealt_Copy_2 = (GDD_Damage x CriticalMultiplier_Copy_2)
      • Set CriticalMultiplier_Copy_2 = 4.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L1) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • -------- Turn on Turn off creates an anti infinite loop stoping the damage from exponentially multiplying --------
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L2) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L3) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy_2 - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy_2)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation (udg_loc)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Just confirm that they actually run ingame.
So I did this:
  • Melee Initialization Copy
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Create starting units (for all players)
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Set PlayerColour[0] = Player 1 (Red)
      • Set PlayerColour[1] = Player 2 (Blue)
      • Set PlayerColour[2] = Player 3 (Teal)
      • Set PlayerColour[3] = Player 4 (Purple)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Precision Aura <gen> is on) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: On
        • Else - Actions
and it displays on
 
Level 9
Joined
Jun 10, 2013
Messages
473
Same thing you did in this post. The only issue is that you put it in the wrong spot.
hmm I did this, and "On" never showed up... I think your On to something
  • Precision Aura
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Set loc = (Position of GDD_DamageSource)
      • Set DamageDealt = (GDD_Damage x CriticalMultiplier)
      • Set CriticalMultiplier = 2.00
      • Set DamageDealt_Copy = (GDD_Damage x CriticalMultiplier_Copy)
      • Set CriticalMultiplier_Copy = 3.00
      • Set DamageDealt_Copy_2 = (GDD_Damage x CriticalMultiplier_Copy_2)
      • Set CriticalMultiplier_Copy_2 = 4.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L1) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • -------- Turn on Turn off creates an anti infinite loop stoping the damage from exponentially multiplying --------
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L2) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Precision Aura <gen> is on) Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: On
            • Else - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L3) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy_2 - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy_2)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation (udg_loc)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Ermmm you're still not doing it right.

You need 3 seperate debug messages: one that says L1, another that says L2, and lastly L3. The debug message that will display L1 will go into the Then - Actions that run if the DamageSoruce has the L1 aura like so:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (GDD_DamageSource has buff Precision Aura L1) Equal to True
    • Then - Actions
      • Set chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • chance Less than or equal to 15
        • Then - Actions
          • Game - Display to (All players) the text: L1 run
          • Trigger - Turn off (This trigger)
          • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
          • Trigger - Turn on (This trigger)
          • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        • Else - Actions
    • Else - Actions
Just repeat it for L2 and L3. The message will not only display to us which Then - Actions is running, but it will show us if any of the conditions are being met at all.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Huhh that's definitely odd. Could you print out what the X and Y value of "loc" are when you cache it on damage?

Convert Real to String > X and Y of Point
  • Game - Display to (All players) the text: (String((X of loc)))
  • Game - Display to (All players) the text: (String((Y of loc)))
before you replied I made this edit to the trigger (added 3 location variables and put them each into the then sections) and now the text shows at the proper location

  • Precision Aura
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Set DamageDealt = (GDD_Damage x CriticalMultiplier)
      • Set CriticalMultiplier = 2.00
      • Set DamageDealt_Copy = (GDD_Damage x CriticalMultiplier_Copy)
      • Set CriticalMultiplier_Copy = 3.00
      • Set DamageDealt_Copy_2 = (GDD_Damage x CriticalMultiplier_Copy_2)
      • Set CriticalMultiplier_Copy_2 = 4.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L1) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • -------- Turn on Turn off creates an anti infinite loop stoping the damage from exponentially multiplying --------
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Set loc = (Position of GDD_DamageSource)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt)))) + !) at loc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L2) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Set TempPoint = (Position of GDD_DamageSource)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy)))) + !) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Precision Aura L3) Equal to True
        • Then - Actions
          • Set chance = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chance Less than or equal to 15
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (DamageDealt_Copy_2 - GDD_Damage) damage of attack type Chaos and damage type Universal
              • Trigger - Turn on (This trigger)
              • Set TempPoint2 = (Position of GDD_DamageSource)
              • Floating Text - Create floating text that reads ((String((Integer(DamageDealt_Copy_2)))) + !) at TempPoint2 with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation (udg_loc)
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call RemoveLocation (udg_TempPoint2)
 
Status
Not open for further replies.
Top