problem with my damage system

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
problem with my damage system +rep for helping

sssssssoooooo ya i made a damage system that uses crit chance evasion crit dmg crit chance reduction and evasion chance reduction and it works with my version of "resilience" like wow and its all working correctly except whenever a unit crits it displays both the crit dmg and the base dmg before crit instead of just displaying the crit dmg... help plz? garunteed +rep if u figure out what is wrong

PS. its so long cuz it has absorbtion and different damage systems for each type of unit: computer, player owned non heros, and heros. this is about 2/3 of the system but a lot of it was done through copy+past of floating text actions :p

Trigger:
  • Damage System
    • Events
    • Conditions
    • Actions
      • -------- Sets the roll for crit and evasion chances --------
      • Set Crit_Chance_Roll = (Random real number between 1.00 and 100.00)
      • Set Miss_Chance_Roll = (Random real number between 1.00 and 100.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Owner of (Damage source)) Not equal to Player 12 (Brown)
              • (Owner of (Damage source)) Not equal to Neutral Hostile
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Damage source) is A Hero) Equal to True
            • Then - Actions
              • -------- Sets crit chance/dodge dodge chance/crit dmg if the damage source is a hero --------
              • Set Crit_Chance = ((5.00 - Crit_Chance_Reduction[(Player number of (Owner of (Triggering unit)))]) + (Crit_Chance_from_Items[(Player number of (Owner of (Damage source)))] + (((Real((Agility of (Damage source) (Include bonuses)))) / (Square root((Real((Hero level of (Damage so
              • Set Crit_Damage = (1.50 x ((Real((Strength of (Damage source) (Include bonuses)))) / ((Square root((Real((Hero level of (Damage source)))))) x 5.00)))
              • Set Miss_Chance = (10.00 + (Miss_Chance_from_Items[(Player number of (Owner of (Triggering unit)))] - Miss_Chance_Reduction_Items[(Player number of (Owner of (Damage source)))]))
            • Else - Actions
              • -------- Sets crit chance/dodge dodge chance/crit dmg if the damage source is a hero's pet --------
              • Set Crit_Chance = (10.00 + (Crit_Chance_from_Items[(Player number of (Owner of (Damage source)))] - Crit_Chance_Reduction[(Player number of (Owner of (Triggering unit)))]))
              • Set Crit_Damage = 1.50
              • Set Miss_Chance = (10.00 + (Miss_Chance_from_Items[(Player number of (Owner of (Triggering unit)))] - Miss_Chance_Reduction_Items[(Player number of (Owner of (Damage source)))]))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Damage source)) Equal to Neutral Hostile
            • Then - Actions
              • -------- Sets crit chance/dodge dodge chance/crit dmg if the damage source is a non-elite npc --------
              • Set Crit_Chance = (10.00 - Crit_Chance_Reduction[(Player number of (Owner of (Damage source)))])
              • Set Crit_Damage = 1.50
              • Set Miss_Chance = (10.00 + (Miss_Chance_from_Items[(Player number of (Owner of (Triggering unit)))] - Miss_Chance_Reduction_Items[(Player number of (Owner of (Damage source)))]))
            • Else - Actions
              • -------- Sets crit chance/dodge dodge chance/crit dmg if the damage source is an elite npc --------
              • Set Crit_Chance = (30.00 - Crit_Chance_Reduction[(Player number of (Owner of (Damage source)))])
              • Set Crit_Damage = 3.00
              • Set Miss_Chance = (10.00 + (Miss_Chance_from_Items[(Player number of (Owner of (Triggering unit)))] - Miss_Chance_Reduction_Items[(Player number of (Owner of (Damage source)))]))
      • -------- Checks for evasion/dodge --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Miss_Chance_Roll Greater than Miss_Chance
        • Then - Actions
          • -------- Checks for a crit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Crit_Chance Greater than or equal to Crit_Chance_Roll
            • Then - Actions
              • -------- checks for absorbtion buff --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Absorbtion ) Equal to True
                • Then - Actions
                  • -------- determines damage taken if the unit has absorbtion --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Damage taken) Greater than or equal to Absorbtion_Life[(Custom value of (Triggering unit))]
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Unit - Cause (Damage source) to damage (Triggering unit), dealing (((Damage taken) x Crit_Damage) - (Damage taken)) damage of attack type Spells and damage type Normal
                      • Trigger - Turn on (This trigger)
                      • Set Damage_Taken = ((Damage taken) x Crit_Damage)
                      • Floating Text - Create floating text that reads (((|c00ccbb44 + Absorb) + (( + ((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r))) + ( + (String((Integer((((Damage taken) x Crit_Damage) - Absorbtion_Life[(Custom value of (Triggering unit))]))))))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Floating Text - Create floating text that reads (((|c00ccbb44 + Absorb) + (( + ((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r))) + ( + (String((Integer((((Damage taken) x Crit_Damage) - Absorbtion_Life[(Custom value of (Triggering unit))]))))))) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Set Absorbtion_Life[(Custom value of (Triggering unit))] = 0.00
                      • Unit - Remove Absorbtion buff from (Triggering unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Damage taken) x Crit_Damage) Greater than or equal to Absorbtion_Life[(Custom value of (Triggering unit))]
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                          • Unit - Cause (Damage source) to damage (Triggering unit), dealing ((((Damage taken) x Crit_Damage) - (Damage taken)) - Absorbtion_Life[(Custom value of (Triggering unit))]) damage of attack type Spells and damage type Normal
                          • Trigger - Turn on (This trigger)
                          • Set Damage_Taken = ((Damage taken) x Crit_Damage)
                          • Floating Text - Create floating text that reads (((|c00ccbb44 + Absorb) + (( + ((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r))) + (String((Integer((((Damage taken) x Crit_Damage) - Absorbtion_Life[(Custom value of (Triggering unit))])))))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                          • Floating Text - Hide (Last created floating text) for (All players)
                          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                          • Floating Text - Create floating text that reads (((|c00ccbb44 + Absorb) + (( + ((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r))) + (String((Integer((((Damage taken) x Crit_Damage) - Absorbtion_Life[(Custom value of (Triggering unit))])))))) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Hide (Last created floating text) for (All players)
                          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                          • Set Absorbtion_Life[(Custom value of (Triggering unit))] = 0.00
                          • Unit - Remove Absorbtion buff from (Triggering unit)
                        • Else - Actions
                          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) x Crit_Damage))
                          • Set Damage_Taken = ((Damage taken) x Crit_Damage)
                          • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + ((String((Integer(((Damage taken) x Crit_Damage))))) + ))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Hide (Last created floating text) for (All players)
                          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                          • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + ((String((Integer(((Damage taken) x Crit_Damage))))) + ))) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Hide (Last created floating text) for (All players)
                          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                          • Set Absorbtion_Life[(Custom value of (Triggering unit))] = (Absorbtion_Life[(Custom value of (Triggering unit))] - ((Damage taken) x Crit_Damage))
                • Else - Actions
                  • -------- Displays damage taken by a crit if the unit does not have absorbtion --------
                  • Trigger - Turn off (This trigger)
                  • Unit - Cause (Damage source) to damage (Triggering unit), dealing (((Damage taken) x Crit_Damage) - (Damage taken)) damage of attack type Spells and damage type Normal
                  • Trigger - Turn on (This trigger)
                  • Set Damage_Taken = ((Damage taken) x Crit_Damage)
                  • Floating Text - Create floating text that reads (Critical! + (String((Integer(((Damage taken) x Crit_Damage)))))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 15.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All players)
                  • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                  • Floating Text - Create floating text that reads (Critical! + (String((Integer(((Damage taken) x Crit_Damage)))))) at (Position of (Triggering unit)) with Z offset 10.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All players)
                  • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
            • Else - Actions
              • -------- If the attack/ability is not a crit --------
              • -------- Checks for Absorbtion --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Absorbtion ) Equal to True
                • Then - Actions
                  • -------- Checks damage taken with absorbtion --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Damage taken) Greater than Absorbtion_Life[(Custom value of (Triggering unit))]
                    • Then - Actions
                      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) - Absorbtion_Life[(Custom value of (Triggering unit))]))
                      • Set Damage_Taken = (Damage taken)
                      • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + (((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r) + ( + (String((Integer(((Damage taken) - Absorbtion_Life[(Custom value of (Triggering unit))])))))))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + (((String((Integer(Absorbtion_Life[(Custom value of (Triggering unit))])))) + )|r) + ( + (String((Integer(((Damage taken) - Absorbtion_Life[(Custom value of (Triggering unit))])))))))) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Set Absorbtion_Life[(Custom value of (Triggering unit))] = 0.00
                      • Unit - Remove Absorbtion buff from (Triggering unit)
                    • Else - Actions
                      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
                      • Set Damage_Taken = (Damage taken)
                      • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + ((String((Integer((Damage taken))))) + )|r)) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Floating Text - Create floating text that reads (|c00ccbb44Absorb ( + ((String((Integer((Damage taken))))) + )|r)) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Hide (Last created floating text) for (All players)
                      • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                      • Set Absorbtion_Life[(Custom value of (Triggering unit))] = (Absorbtion_Life[(Custom value of (Triggering unit))] - (Damage taken))
                • Else - Actions
                  • -------- Displays damage taken if the unit does not have absorbtion and the damage source does not crit --------
                  • Set Damage_Taken = (Damage taken)
                  • Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All players)
                  • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Triggering unit)) Equal to (Matching player)))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
                  • Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All players)
                  • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
        • Else - Actions
          • -------- Displays missess/dodges --------
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
          • Set Damage_Taken = 0.00
          • Floating Text - Create floating text that reads |c00ccbb44Miss|r at (Position of (Triggering unit)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Hide (Last created floating text) for (All players)
          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
          • Floating Text - Create floating text that reads |c00ccbb44Dodge|r at ((Position of (Triggering unit)) offset by (-50.00, 0.00)) with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Hide (Last created floating text) for (All players)
          • Floating Text - Show (Last created floating text) for (All players matching ((Owner of (Damage source)) Equal to (Matching player)))
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 45.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds


this isnt the entire code, it was too long so i took off the npc/pet part :D
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
also + rep if u tell me how to compact how it displays that :/
and id put this in edit post but i just made it so it doesnt change a thing no matter how i do it
 

Mythes

Member
Reaction score
7
I have to say:
That's a F***ing long trigger....
No idea how to help you, I'm just really impressed with the size of the trigger...
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
I have to say:
That's a F***ing long trigger....
No idea how to help you, I'm just really impressed with the size of the trigger...

lol i myself didnt realize the size of it until it was finished... i think it just wont let me put it in the scrollbar one cuz its too long lmfao... the whole trigger is 80,000 characters long

and its soo effing long cuz it takes so many variables into account... crit chance, crit dmg, evasion, crit chance reduction, evasion reduction, crit dmg reduction, and absorbtion into account
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
80k chars and it will almost certainly need to be rewritten, ub3r fail.
It leaks like a sieve.
Also its completely inefficient there are a few damage systems rather use those.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
it doesnt leak... at all, did u even read it or just assume... and its so long because its 3 different systems for heroes npcs and hero pets all put together. before u talk shit on someones work make sure u actually know what they did... and it doesnt cause any lag even when running for 1+hrs because it doesnt save any of the variables and reuses them... plz if ur gonna talk shit on someones system do it when they are trying to upload it for public use and do it knowledgebly

and none of the damage systems i can find have crit dmg, crit chance, evasion chance, crit chance reduction (reduces the chance that enemies crit u) crit dmg reduction (reduces the dmg taken from critical strikes) evasion reduction (reduces the chance that your enemies evade you) and absorbtion (a buff that takes damage for you instead of you taking damage). if u can find one... tell me and ill give u +rep but till then troll somewhere else.
 

tommerbob

Minecraft. :D
Reaction score
110
Some suggestions:

1. Use Weep's GDD. It does not leak events. (I don't know if your's does or not. But I still suggest using his system anyway)

2. Use Comment Lines in your code. It makes it much easier to read for anyone who will look at it or use it (including yourself).

3. Using the above comment lines that I suggested, separate your trigger into different sections: 1) Miss/Dodge, 2) Crit, 3) Spell Damage, 4) Other factors, etc. etc.

4. Use a separate trigger for displaying your floating text. It is much more efficient because you can use conditions to simplify which floating text you want to create or not. For example:

Trigger:
  • If / Then / Else
    • If - Conditions
      • Crit_Chance_Roll Less Than or Equal to Crit_Chance
    • Then - Actions
      • Set IsCrit = True
    • Else - Actions
    • If / Then / Else
      • If -Conditions
        • IsCrit = True
      • Then - Conditions
        • Cause damage source to damage target for crit damage, blah blah
        • Trigger - Run (Show Damage trigger) ignoring conditions
      • Else - Conditions


And then in the other trigger (Show Damage), you would display the text of the damage, and use conditions to check which damage you will display. That's just an example.

Overall, your trigger just seems very unorganized, so I suggest just starting with organizing it better with comment lines and putting it into sections.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i revised it a bit to something i thought would work better but now it wont display hero damage and it wont show crit dmg correctly still... added comments to make it more understandable/readable
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
it doesnt leak... at all, did u even read it or just assume... and its so long because its 3 different systems for heroes npcs and hero pets all put together. before u talk shit on someones work make sure u actually know what they did... and it doesnt cause any lag even when running for 1+hrs because it doesnt save any of the variables and reuses them... plz if ur gonna talk shit on someones system do it when they are trying to upload it for public use and do it knowledgebly

and none of the damage systems i can find have crit dmg, crit chance, evasion chance, crit chance reduction (reduces the chance that enemies crit u) crit dmg reduction (reduces the dmg taken from critical strikes) evasion reduction (reduces the chance that your enemies evade you) and absorbtion (a buff that takes damage for you instead of you taking damage). if u can find one... tell me and ill give u +rep but till then troll somewhere else.

Well learn to code then you can say what and what doesnt leak.
Also Custom Values are fail, use an indexing system. Also systems should be written in Jass or vJass for efficiency.
I noticed multiple Floating texts that use unsaved variables which you dont clear so they leak.
If you cant accept crit dont post it in a public forum...

Also its only trolling when some one rages over a post, and if you raged over it then ignore it.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Well learn to code then you can say what and what doesnt leak.
Also Custom Values are fail, use an indexing system. Also systems should be written in Jass or vJass for efficiency.
I noticed multiple Floating texts that use unsaved variables which you dont clear so they leak.
If you cant accept crit dont post it in a public forum...

Also its only trolling when some one rages over a post, and if you raged over it then ignore it.

I'm pretty sure although he may not be too advanced of a coder, you don't have to give him such criticisms. If he's making a fuss over your constructive comments, I'll have nothing to say. But don't you find calling his codes ub3r fail without telling him how he can improve on it, or examples, a little mean? (You're not supposed to go around criticising work anyway, so I don't suppose he's wrong if he can't take it.)

I don't find custom values fail, though it'd be more efficient if you used an indexing system.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
thank you skyblader... the difference between constructive criticism and what u did is constructive criticism tells you how you can improve, and isnt an attack on the person, trolling is when u just talk shit for the sake of talking shit, and i take the indexing system comment as constructive because its helpfull, iv tried using AIDS but it didnt seem to work right : ( i always get a syntax error after following the directions...

ps. i believe constructive criticism... is constructive? correct me if im wrong
 

HydraRancher

Truth begins in lies
Reaction score
197
Well learn to code then you can say what and what doesnt leak.
Also Custom Values are fail, use an indexing system. Also systems should be written in Jass or vJass for efficiency.
I noticed multiple Floating texts that use unsaved variables which you dont clear so they leak.
If you cant accept crit dont post it in a public forum...

Also its only trolling when some one rages over a post, and if you raged over it then ignore it.

If you can't give constructive criticism (<notice how we spell out words) then don't post in a public forum.

On a technical note, trolling is the repetitive combination of lurking and flaming. Usually also involves spamming.



I'd recommend disabling parts of the trigger to isolate the problem, then work from there.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
thanks but iv found a solution, i have the damage system in one trigger and then after damage is done, based on conditions it fires a trigger displaying the damage text, does anyone have a solution for the floating text leaking if it actually does, like hex said? and ty hydra... ur posts have usually been helpfull so ill +rep u :) same to u skyblader

edit: skyblader iv already given u too much rep to give u more before i give it to someone else lol... i guess this is so a buncha people dont just give each other rep till they have rediculous ammounts? either way i didnt even know iv given u that much, just recognized ur name :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top