• 🏆 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!

Wow floating Critical dmg ++Rep

Status
Not open for further replies.
Level 12
Joined
Dec 17, 2009
Messages
951
guys i need a floading dmg text system to a 'unique unit'.like world of warcraft dmg text.
*Like this ->
50 - 100 - 200 - 500
*More dmg, more big the text.

Plz i really need this sys. ++Rep and special thanks to who help me.

Ty
.VTZ.
 
Level 12
Joined
Dec 17, 2009
Messages
951
Everything has LIMIT
What is the max size of the text and what is the value of the max of it ?
I mean 1000 is the max or something ?
Defskull! haha i love this guy :p
yes yes, 1000 is the limit like this 1000
1000 dmg (maximun) size 80 - - 50 dmg (minimun) 15 size.
^_^
 
Level 12
Joined
Dec 17, 2009
Messages
951
Really.. ?
You want 1000 to be the max ?
I'll create the system but...
Will be busy with DotA, with friends first >.<
I think there is somebody else will cut through me, oh well...
I'm late !
1000 have size 80, is not soo big. :thumbs_up:
ok GL at DotA
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Since defskull mentioned he will be busy and this sytem was quick to make, I decided to create it.

You can configure:
Minimun floating text size
Maximum floating text size
Minimum damage
Maximum damage

If damage taken is less than minimum damage, floating text will be the minimum size. Same with maximum values. This prevents the text to be extremely tiny or huge.

Damage values between min and max value are scaled linearly.

You can type the damage you want to deal. For example to deal 100 damage, type

d 100

You can modify the unit filters to limit the damage detection to work only on some units. Now it works for all but structures.


  • Configure
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set FLOAT_MIN_SIZE = 10.00
      • Set FLOAT_MAX_SIZE = 20.00
      • Set FLOAT_MIN_DMG = 10.00
      • Set FLOAT_MAX_DMG = 500.00
      • Trigger - Turn on Init 2 <gen>
      • Trigger - Run Init 1 <gen> (ignoring conditions)
  • Init 1
    • Events
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Damage to Floating Text <gen> the event (Unit - (Picked unit) Takes damage)
  • Init 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Trigger - Add to Damage to Floating Text <gen> the event (Unit - (Triggering unit) Takes damage)
  • Damage to Floating Text
    • Events
    • Conditions
    • Actions
      • Set r1 = (Damage taken)
      • Set u1 = (Triggering unit)
      • -------- -------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • r1 Less than or equal to FLOAT_MIN_DMG
        • Then - Actions
          • Set r2 = FLOAT_MIN_SIZE
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • r1 Greater than or equal to FLOAT_MAX_DMG
            • Then - Actions
              • Set r2 = FLOAT_MAX_SIZE
            • Else - Actions
              • Custom script: set udg_r2 = udg_FLOAT_MIN_SIZE * ( 1 + udg_r1 / udg_FLOAT_MAX_DMG )
      • -------- -------------------------------------------------------------- --------
      • Floating Text - Create floating text that reads (String((Integer(r1)))) above u1 with Z offset 0.00, using font size r2, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.70 seconds
      • -------- -------------------------------------------------------------- --------
 

Attachments

  • Damage_Scaled_Floating_Text.w3x
    18.7 KB · Views: 25
Status
Not open for further replies.
Top