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

[Trigger] [Floating Text] Damage show up + Effects

Status
Not open for further replies.
Level 16
Joined
Aug 20, 2009
Messages
1,552
well, could anyone made a floating text that will show up damage dealt?

its not the normal simple floating text that just moves away,and fades.

i want it to change its Font size gradually, getting bigger, than smaller at a certain time. (it fades in the middle of the getting smaller.)

it goes in a Inverted U shape, just like in Ragnarok online.
just like a fountain..

It comes from the direction of where the attacking unit are.

Note : The Colour of the font depends on the Team Colour of the Unit Attacking Unit.

i have seen this in the map "FATELCF"
A.k.a Fate Last Calix Defender

and another map, i forgot what it is...but its gradual font change is very smooth, and its really beautiful, so i wanted this on my map :D

i could make a normal ones, where it just show damage, and move away in the direction it is attacked from...
but not this one.. Help will be appreciated :D with Credits all around my map, in the middle of the map, in the credit section, in the corner of my map, in the loading screen of the map, etc..

with +REP ofcourse xD
 
Level 12
Joined
Aug 22, 2008
Messages
911
To know the amount of damage dealt you'd need a damage detection system, and it's very complicated. Still, there are plenty of those in the spells database in the site.
As for the floating text itself - changing the font, the color, the time the text lasts, the fading rate and the direction it glides to - they're all very easy to change if you use an interval trigger and a hashtable.
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
Its the opposite to me, i got a trigger that detects damage almost perfectly...

the only problem is creating the animation, for it..where the font changes, and stuff...

this is what i use to display damage..

1st Trigger, to detect all originally placed units on map, and include it to the main trigger
  • Install Display Damage
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Set tempGroup[0] = (Units in (Playable map area))
      • Unit Group - Pick every unit in tempGroup[0] and do (Actions)
        • Loop - Actions
          • Trigger - Add to Display Damage <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_tempGroup[0])
2nd Trigger, to Include all created units on map to the main trigger
  • Confirm Display Unit
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Display Damage <gen> the event (Unit - (Triggering unit) Takes damage)
The Main Trigger, to display damage...what i need is making the animation...just like i mentioned..could you make modifications for the "Animation" i wanted?, refer to ragnarok online's animation, that would be perfect :D
  • Display Damage
    • Events
    • Conditions
    • Actions
      • Set tempInt[0] = (Integer((Damage taken)))
      • Set tempInt[1] = (tempInt[0] / 6)
      • Set tempPoint[0] = (Position of (Attacked unit))
      • Set tempPoint[1] = (Position of (Damage source))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempInt[1] Less than or equal to 90
        • Then - Actions
          • Set tempPoint[2] = (tempPoint[0] offset by (5.00 + (Real(tempInt[1]))) towards (Angle from tempPoint[1] to tempPoint[0]) degrees)
        • Else - Actions
          • Set tempPoint[2] = (tempPoint[0] offset by 90.00 towards (Angle from tempPoint[1] to tempPoint[0]) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempInt[0] Greater than or equal to 1
        • Then - Actions
          • Floating Text - Create floating text that reads (<Empty String> + (String((Abs(tempInt[0]))))) at tempPoint[0] with Z offset 50.00, using font size 10.00, color (15.00%, 100.00%, 100.00%), and 0.00% transparency
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempInt[0] Less than 0
            • Then - Actions
              • Floating Text - Create floating text that reads (+ + (String((Abs(tempInt[0]))))) at tempPoint[0] with Z offset 50.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
            • Else - Actions
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to ((Real(tempInt[0])) / 1.35) towards (Angle from tempPoint[1] to tempPoint[0]) degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.30 seconds
      • Custom script: call RemoveLocation(udg_tempPoint[0])
      • Custom script: call RemoveLocation(udg_tempPoint[1])
      • Custom script: call RemoveLocation(udg_tempPoint[2])
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
http://www.youtube.com/watch?v=DJvio_DG7xI
you could see damage dealt in there... flying in that shape..
well, you probably can't notice but, the text starts at a small Font, then gradually becomes big, and it goes smaller and smaller..

i seen a Warcraft map that has this kind of damage show up, which is really beautiful..
thats why i requested this :D

http://www.youtube.com/watch?v=KbEztaAYbL0
If possible, see how the damage is accumulated when someone does a combo, is this possible to make? (see the yellow text above)
 
Level 12
Joined
Aug 22, 2008
Messages
911
There are two tricky things in all this: the slight curve and the change of font. If you can find a way to save the font size and the angle towards which it floats, and to access that data each time you want to change it (perhaps a hashtable) - you'll have no problem executing this project.
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
so...is this impossible without JASS?..

i guess the other map that has this damage system must have uses JASS, considering how hard is it on GUI..

as the movement is so smooth..with its font change..

have you tried making it?..

i will keep trying too, hope someone will be able to help me..

i never touches JASS, nor know what is a hashtable D:, gonna be a problem for me..

better start trying :D
 
Level 12
Joined
Aug 22, 2008
Messages
911
I'm not going to make this trigger for you (this is not the requests forum), but I am going to help you see what is needed.
What you need is a trigger that takes the damage dealt on an attack and generate a line of floating text on the attacked unit that represents that amount. It also needs to set its initial direction and the initial velocity, the amount of time it lasts and the amount of time after which it will begin to fade. Not much of a problem, right?
After that you need a periodic time trigger that runs around 10 times a second and changes the size and direction of the text, and comparing to the biggest size you want to know if it needs to be bigger or smaller. If you catch my drift, it's not difficult at all.
Nothing I just said requires JASS, in fact I'd consider it rather simple GUI.
 
Level 7
Joined
Apr 3, 2009
Messages
317
So the tutorial in the tutorial section doesn't fit your standards?
Must you really customize it, no one will really care.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
D4RK_G4ND4LF, how do you enable this for all players?
And do the numbers only show for that player or all players as well?

ask blizzard
as far as I remember floating text above units are shown for every player able to see that unit but it might be not like that
but there are gui functions to deal with that

hide text for all players
set playergroup = players matching matching player is able to see triggering unit or something
show text for playergroup
call DestroyForce(udg_playergroup)
 
Level 7
Joined
Jun 8, 2010
Messages
283
Well I tested this with blue and for some reason it doesnt work? If I were to hide the floating text so that only members of the team could see the text, does this make it 100 floating text for each player enabled? Or is it a maximum of 100 floating text at any given time?
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
Nice one, thx D4RK_G4ND4LF

+REP

its a really neat work you did there :D

i really appreciate it

:thumbs_up::thumbs_up:

------------------------------------
btw, i found some issue, when i keep following the floating text until down there, i see snows...
i think i can make snows with ultra small floating text :D

where can put its fading age and lifespan? if i put it, there seems to be a bug that will suddenly remove a floating text or two, when it appears.
hope you get the problem i am speaking off :D...
 
Last edited:
Status
Not open for further replies.
Top