- Joined
- Oct 31, 2007
- Messages
- 30
Well I have this problem, that when I am creating 100 floating text, not all show up. Interestingly how many show up depends on where I put the texttag creation in the code and on my random starting position on the map which is in no way connected to this trigger except for maybe my initial camera position. This would be the code I use for creating the tags. They are meant to be permanent so there is really no need to store them.
Two more things: Apparently not all players are missing the same texts. And sometimes when I am spawned in the lower edge of the map (9th or 10th row if that matters or means anything to you) all texts are visible/there (for me).
I have already tried a recursive trigger and waits to no avail. Should I try timers or is there any other explanation for this behavior?
Thanks in advance.
JASS:
function Trig_GameInit_Actions takes nothing returns nothing
local texttag TempTag
local rect TempRect
local integer ForA = 0
local integer ForB
loop
exitwhen ForA > 9
set ForB = 0
loop
exitwhen ForB > 9
set TempTag = CreateTextTag()
call SetTextTagText(TempTag, (I2S(ForA) + ":" + I2S(ForB)), 0.0414)
set TempRect = udg_gam_planets[( ( ForA * 10 ) + ForB )]
call SetTextTagPos(TempTag, GetRectCenterX(TempRect), GetRectCenterY(TempRect), 36.0)
call SetTextTagColor(TempTag, 220, 220, 220, 255)
set ForB = ForB + 1
endloop
set ForA = ForA + 1
endloop
set TempTag = null
set TempRect = null
//rest of the trigger
//===========================================================================
function InitTrig_GameInit takes nothing returns nothing
set gg_trg_GameInit = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_GameInit, 0.4, false )
call TriggerAddAction( gg_trg_GameInit, function Trig_GameInit_Actions )
endfunction
I have already tried a recursive trigger and waits to no avail. Should I try timers or is there any other explanation for this behavior?
Thanks in advance.