trb92
Throwing science at the wall to see what sticks
- Reaction score
- 142
I made this trigger, which should show the damage dealt in a floating text, but it doesn't. However, the BJDebugMsg shows the correct damage, so I can't find a problem. Could one of the better JASS people here help me out?
JASS:
function ShowDamage_Actions takes nothing returns nothing
local texttag t = CreateTextTag()
local real angle = GetUnitFacing(GetEventDamageSource())
call SetTextTagText(t,R2S(GetEventDamage()),10)
call SetTextTagPosUnit(t,GetEventDamageSource(),0)
call SetTextTagColor(t,100,0,0,0)
call SetTextTagVelocityBJ( t, angle + 180., 90 )
call SetTextTagLifespan(t,3.)
call SetTextTagFadepoint(t,2.)
call SetTextTagVisibility(t,true)
call BJDebugMsg("Damage Dealt: "+R2S(GetEventDamage()))
endfunction
//===========================================================================
function InitTrig_Show_Damage takes nothing returns nothing
set gg_trg_Show_Damage = CreateTrigger()
call TriggerAddAction(gg_trg_Show_Damage, function ShowDamage_Actions)
endfunction