Floating texts.

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.

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~
 

Tom Jones

N/A
Reaction score
437
Forum Rules said:
If 24 hours have passed, you were the last one to post, and your question has not been answered, you may bump your thread. But the 24 hour limit will be enforced, so be careful.
Read and respect the rules, it's all we ask.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top