• 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.

can i make critical damage with GUI ?

Status
Not open for further replies.
Level 9
Joined
Jan 3, 2010
Messages
359
i want to make a RPG map, and i want to deal critical but showing the damage amount on floating text with GUI.
Can you give an example for that ?
I used the ordinary damage taken, but it's shows the normal damage and the crit damage.
 
Level 6
Joined
Jan 31, 2009
Messages
166
Does't the default critical strike ability in the object editor already show a red floating text for critical hits? It would be nice if you gave us more detail on what kind of criticals you are talking about (eg spell criticals) and if you relly need to do it via triggers or if the standard object editor ability would work.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
You need a damage detection system. If there is a GUI one in existence, use that one. You'll also need a floating text-tag system. If there is a GUI one in existence, use that one. When a unit is damaged, use the text-tag system to achieve your l33t shit.
 
Level 9
Joined
Jan 3, 2010
Messages
359
what i mean is dealing critical with random real number in triggers, and and shows it with floating text, but the floating text is bugged; it shows the normal damage and the critical damage. I want to show only the critical damage.
 
what i mean is dealing critical with random real number in triggers, and and shows it with floating text, but the floating text is bugged; it shows the normal damage and the critical damage. I want to show only the critical damage.

So I guess you deal the "normal" damage then deal another one afterwards (the "critical" one) so 2 damages will show... just deal one damage though it would need to trigger every damage you deal.

  • Actions
    • If-then-else
      • If- conditions
        • blahblah
      • then -actions
        • deal normal damage
      • else - actions
        • deal critical damage
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Adiktuz said:
I used the ordinary damage taken, but it's shows the normal damage and the crit damage.

So you used the "Event - Unit Takes Damage" and "it" shows the normal damage "and" the critical damage.

You're completely unspecific when you say "it", you haven't given any information on how you are displaying the damage. You also aren't giving us any information on how you go from the unit taking damage to the values that you are displaying, using your unspecified damage-text method.

If you want us to put any effort into answering your questions, then put some effort into asking them.
 
oh, so i just have to give a condition to check the critical damage ?
well thank you then.

and i'm sorry i'm not very good at english ^^

what I'm trying to say is that you should trigger the damage dealt. I'm not sure how you deal damage because you did not post a trigger. But if you just used normal attack then
  • Event
    • Unit - A unit takes damage
it would definitely bug because you deal a normal damage then if you hit a critical damage(which I believe you triggered) then it would definitely deal damage twice, one normal and one crit so 2 textags.
 
Level 9
Joined
Jan 3, 2010
Messages
359
what I'm trying to say is that you should trigger the damage dealt. I'm not sure how you deal damage because you did not post a trigger. But if you just used normal attack then
  • Event
    • Unit - A unit takes damage
it would definitely bug because you deal a normal damage then if you hit a critical damage(which I believe you triggered) then it would definitely deal damage twice, one normal and one crit so 2 textags.

yes that's the one that i'm talking about.
so, what can i do to make it a single critical textag ?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Because there's no fun in that. You should make it a requirement of ability/system script submissions that they require a library called "Fun". The syntax would be as follows:

JASS:
library EagleSight initializer Init requires Fun
 
Because there's no fun in that. You should make it a requirement of ability/system script submissions that they require a library called "Fun". The syntax would be as follows:

JASS:
library EagleSight initializer Init requires Fun

what does that do?!...

yes that's the one that i'm talking about.
so, what can i do to make it a single critical textag ?

just make all damage done in your map to be triggered... the problem you have is because the unit deals the normal damage then you trigger a critical hit which also deals damage so basically the unit hits 2 times when critical is triggered...
 
Level 3
Joined
Oct 9, 2008
Messages
61
Do a unit with only 1 damage and then use this trigger:

  • Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to YourUnit
    • Actions
      • Set Damage = (Random real number between 20.00 and 50.00)
      • Set CrittChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CrittChance Less than or equal to 25
        • Then - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Damage x 2.00) damage of attack type Hero and damage type Normal
          • Floating Text - Create floating text that reads ((String((Damage x 2.00))) + !) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Set CrittText[TextCount] = (Last created floating text)
          • Unit - Set the custom value of (Attacked unit) to TextCount
          • Set TextCount = (TextCount + 1)
          • Wait 1.00 seconds
          • Floating Text - Destroy CrittText[(Custom value of (Attacked unit))]
        • Else - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing Damage damage of attack type Hero and damage type Normal
(Damage=Real Variable, CrittChance=Integer, CrittText=Floating Text Array, TextCount Integer)
 
Do a unit with only 1 damage and then use this trigger:

  • Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to YourUnit
    • Actions
      • Set Damage = (Random real number between 20.00 and 50.00)
      • Set CrittChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CrittChance Less than or equal to 25
        • Then - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Damage x 2.00) damage of attack type Hero and damage type Normal
          • Floating Text - Create floating text that reads ((String((Damage x 2.00))) + !) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Set CrittText[TextCount] = (Last created floating text)
          • Unit - Set the custom value of (Attacked unit) to TextCount
          • Set TextCount = (TextCount + 1)
          • Wait 1.00 seconds
          • Floating Text - Destroy CrittText[(Custom value of (Attacked unit))]
        • Else - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing Damage damage of attack type Hero and damage type Normal
(Damage=Real Variable, CrittChance=Integer, CrittText=Floating Text Array, TextCount Integer)

you dont need those custom values and the wait... you can just set the lifespan of the texttag and disable permanence.
 
Status
Not open for further replies.
Top