HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Quick noob question

06-20-2006, 11:51 AM#1
SharQueDo
How can I display the damage taken of a unit above it's head (floating text?)?

edit: Is this an option somewhere or do I need to make a trigger for it?
06-20-2006, 12:06 PM#2
PipeDream
If you're not using crit strike already, you could use crit strike with no multiplier.
This has problems obviously, so if this is no good, you got to trigger it. There's a discussion on triggering damage taken here and you can make nice text tags with something like
Collapse JASS:
function FadingText takes string msg, integer red, integer green, integer blue, real x, real y, real spd, real fadetime, real life returns nothing
    local texttag t=CreateTextTag()
    call SetTextTagText(t,msg,0.024)
    call SetTextTagPos(t,x,y, 0.00)
    call SetTextTagColor(t,red,green,blue,255)
    call SetTextTagVelocity(t,0,spd)
    call SetTextTagVisibility(t, true)
    call SetTextTagFadepoint(t, fadetime)
    call SetTextTagLifespan(t, life)
    call SetTextTagPermanent(t, false)
    set t=null
endfunction
06-20-2006, 12:07 PM#3
Captain Griffen
Quote:
Originally Posted by PipeDream
If you're not using crit strike already, you could use crit strike with no multiplier.

Even though that ignores armour, making it very bad for most circumstances.
06-20-2006, 04:12 PM#4
Ghost.X
I'm just making this up at the top of my head without verifying it but try something like this. Make a real variable. Then make a trigger with a unit takes damage event, make the real variable equal to the damage taken by damaged unit. Then make a trigger that will display floating text on the position of the damaged unit with head attachment or something and make the text equal to the real variable converted to string. I'm not sure, i'm at a school computer so I can't check it out my self.
06-20-2006, 07:25 PM#5
SharQueDo
Trigger:
Untitled Trigger 001
Collapse Events
Unit - No unit Takes damage
Conditions
Collapse Actions
Floating Text - Create floating text that reads (String((Damage taken))) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency

I can only use 'Take damage' with Specific Unit event, not with Generic Unit event, which is what I want. :/

Anyone got a workaround for this?

Edited by Blade.dk. Reason: Replaced code tags with trigger tags.
06-20-2006, 07:52 PM#6
Captain Griffen
You have to add the unit events on map init and then again when new units enter the map.
06-20-2006, 07:55 PM#7
Blade.dk
http://www.wc3campaigns.net/misc.php?do=bbcode#trigger
06-21-2006, 09:35 PM#8
Freakazoid
This isn't a noob question, this requires advanced jassing.
06-21-2006, 09:36 PM#9
Rising_Dusk
I hate damage detect systems with a passion.
They're just so annoying to implement, and you'd think Blizzard would have thought ahead and added it in.

Oh well, if they had they probably would have fixed the return bug too.
Then we'd all be screwed.
06-22-2006, 06:12 PM#10
Ghost.X
I think this can be done with Gui simpler then you think. I don't know. I can try it out later on.
06-22-2006, 06:17 PM#11
Freakazoid
Quote:
Originally Posted by Ghost.X
I think this can be done with Gui simpler then you think. I don't know. I can try it out later on.

Yea right,....

Prove it. :P
06-22-2006, 06:19 PM#12
Ghost.X
Thats what i'm gonnna attempt to do, but not for a while, I GOT EXAMS TO WORRY ABOUT....maybe I post next wednesday.