kallieblakie
New Member
- Reaction score
- 5
I have a problem with my floating texts. Initially texts can be displayed a few at at time. After a while, the floating texts replaces each other. Meaning, only one can be displayed at a time. How do i solve this? I'm using it for a damage displayer, displaying damage dealt to units.
How do you null floating texts? I think its the problem with the limit of number of floating texts.
*Edit*
bumps~
JASS:
function Trig_DamageDisplay_Actions takes nothing returns nothing
local unit p = GetTriggerUnit()
local texttag D = CreateTextTag()
local location t
local real damage = GetEventDamage()
set t = GetUnitLoc(p)
set D = CreateTextTagLocBJ(I2S(R2I(damage))+"!",t,0,10,100,0,0,1)
call SetTextTagPermanent( GetLastCreatedTextTag(), false)
call SetTextTagLifespan(D,1.0)
call RemoveLocation(t)
set p = null
set D = null
set damage = 0.0
set t = null
endfunction
function Trig_Damage_Actions takes nothing returns nothing
local trigger tr = CreateTrigger()
call TriggerRegisterUnitEvent( tr, GetTriggerUnit(), EVENT_UNIT_DAMAGED )
call TriggerAddAction(tr,function Trig_DamageDisplay_Actions)
endfunction
//===========================================================================
function InitTrig_Damage takes nothing returns nothing
set gg_trg_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Damage, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Damage, function Trig_Damage_Actions )
endfunction
How do you null floating texts? I think its the problem with the limit of number of floating texts.
*Edit*
bumps~