• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

This Leak?

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
  • Floating Text - Create floating text that reads ((String(Damage)) + !) above GDD_DamagedUnit with Z offset 0.00, using font size 14.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Do I need to set
Set TempLoc to Position of Unit(GDD_DamagedUnit)
Floating text to TempLoc?
 
Floating texts dont realy leak. As they are limited to 100 they will destroy themselves if to many are there. There is no need for a point-removal as there is no point. Last but not least: strings leak but thats unavoidable.

As far as I know Floating Texts don't automatically destroy themselves unless they are given a life-span, destroyed directly, or anything else along those lines. Once you reach 100 non-destroyed floating texts, they will all start being assigned a 0 handle ID and therefore some text tags will no longer be able to be referenced. (to be manipulated or destroyed or whatever)
 
Level 13
Joined
Mar 16, 2008
Messages
941
Well, I never worked with text tags in such a way as I ever added a lifespan. However, I remember the bunchload of guys crying about their text tags being destroyed automaticly and the crowd of people answering that they are limited to 100. I'll make a test and edit in a few minutes ;)

EDIT: Ok, no more time today. I did some tests and I'm confused. I tried to create 110 texttags reaching from 0 to 109. 0-98 were created, 99-108 skipped and 109 created. The math is just for a better visibility. Any mistakes of mine? o.o
JASS:
library TagTest initializer InitTagTest

    private function StartTest takes nothing returns nothing
        local integer i = 0
        local integer j = 0
        local integer y = 0
        local texttag test
        
        loop
            exitwhen i >= 110
            set test = CreateTextTag()
            if ModuloInteger(i, 10) == 0 then
                set y = y - 50
                set j = 0
            endif
            call SetTextTagPos(test, j*50, y, 50)
            call SetTextTagText(test, I2S(i), 0.0276)
            set j = j+1
            set i = i+1
        endloop
    endfunction


    private function InitTagTest takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterPlayerChatEvent(t, Player(0), "-start", true)
        call TriggerAddAction(t, function StartTest)
    endfunction

endlibrary

testgh.jpg
 
Last edited:
Level 8
Joined
Dec 9, 2009
Messages
397
What I believe, because you were ending at 110, the 0-98 worked because thats 99 text tags, number 100 was 99 and 99 was removed for 100, then 100 was removed for 101 and so on, till it got to the end which was 109
 
Status
Not open for further replies.
Top