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

magnitude ability text?

Status
Not open for further replies.
Level 3
Joined
Oct 14, 2009
Messages
33
hi, i made a magnitude ability that does a random amount of damage, what i want to know is how to make it show a text based on the amount it did. the attack does 1-70 damage and i want the text to change for every 7 damage. 1-7 it would say magitude 1. 8-14 would be magnitude 2 etc. i would realy appreciate the help. thx in advance.
 
  • Actions
  • Set Random = (Random integer number between 1 and 70)
  • For each (IntegerA) from 1 to (Random), do (Actions)
    • Loop - Actions
      • For each (IntegerB) from 1 to 6, do (Actions)
        • Loop - Actions
          • Floating Text - Create floating text that reads x above (Triggering unit) with Z offset 0.00, using font size ((IntegerA)/(IntegerB)), color (100.00%, 100.00%, 100.00%), and 0.00% transparency
 
Level 8
Joined
Jan 8, 2010
Messages
493
  • Actions
  • Set Random = (Random integer number between 1 and 70)
  • For each (IntegerA) from 1 to (Random), do (Actions)
    • Loop - Actions
      • For each (IntegerB) from 1 to 6, do (Actions)
        • Loop - Actions
          • Floating Text - Create floating text that reads x above (Triggering unit) with Z offset 0.00, using font size ((IntegerA)/(IntegerB)), color (100.00%, 100.00%, 100.00%), and 0.00% transparency

isn't x supposed to be the ((IntegerA)/(IntegerB))? :eek:
 
Actually "X" is just the text; well, not IntegerA/IntegerB, just "Random", because he wants the random damage between 1 and 70. IntegerA/IntegerB is for the size only, what he refers to as magnitude. Sorry for forgetting this:
  • Actions
    • Set Random = (Random integer number between 1 and 70)
    • For each (IntegerA) from 1 to (Random), do (Actions)
      • Loop - Actions
        • For each (IntegerB) from 1 to 6, do (Actions)
          • Loop - Actions
            • Floating Text - Create floating text that reads (String(Random)) above (Triggering unit) with Z offset 0.00, using font size ((IntegerA)/(IntegerB)), color (100.00%, 100.00%, 100.00%), and 0.00% transparency
 
Level 3
Joined
Oct 14, 2009
Messages
33
my random damage trigger is very basic. it consists of three parts:
Event-unit-a unit begins casting an ability
Condition-(ability being cast) equal to magnitude
Action-Unit-Cause unit to damage circular area after 1.00 seconds of radius 250 at (target point of ability being cast), dealing (random real number between 1 and 70) damage of attack etc...
this is all i have and it works fine, so, will i have to remake it or can i just add the text part in?
(edit) also, could u tell me how to set up the first few parts of that?
 
Level 3
Joined
Oct 14, 2009
Messages
33
i think these are the last questions i'll have but, do i have to repeat this for every damage section, like 1-7, 8-14 etc.? or will this set up say a different text for each damage section automaticaly? and last, where do i insert the text i want? i hope i'm clear enough and not being too much of a bother. thx a ton
 
No, it automatically does that, if I got your question. Test the random values and you'll see.
Where do you insert the text you want? In the
  • Floating Text - Create floating text that reads (String(Random))
go to "(String(Random))" and choose from the list "Concatemate Strings". Now you have too strings. Write what you want in the first string field and press spacebar once (so that it leaves some space, before displaying the damage) and in the second string field go to "Conversion -> Convert Integer to String" and choose the "Random" variable.
 
Level 3
Joined
Oct 14, 2009
Messages
33
you said "(so that it leaves some space, before displying damage)"
does that mean this will show damage? cuz, well, to be honest, damage isn't what i need... i'm looking for a text shown for a specific amount of damage... unless i understand u wrong. however, if damage is the case thats not a problem... cuz now i know ALOT more than i did before... ALOT.
 
Status
Not open for further replies.
Top