• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Floating text not displaying

Status
Not open for further replies.
Level 4
Joined
Sep 20, 2005
Messages
72
I've encountered a strange problem lately. In one trigger i try to create 14 floating texts that label several locations on the map. I need these to be permanent (yet can be disabled), so it was simple. or so i thought...

all i do is
- create templocation
- create floating text at this location
- set floating text array pointing to last created floating text
- remove templocation
and i do this 14 times repeatedly (i would put them in an array, but i need them different colors, so this would be less work)

now this seems to work fine for the first 3 floating texts (and its always these 3 that appear), but then none of the other ones gets created! :confused:
if i add some random wait between the floating texts (which is ridiculous in itself already, shouldnt have a single effect), i can sometimes get 2 of the texts working, but its unpredictable. So strange :eekani:

any ideas?
 
Level 4
Joined
Sep 20, 2005
Messages
72
well, the debug msgs ran fine. no op limits cuz im doing so few things.

I've fixed the problem (kinda). but its so strange... at first i was skeptical about using symbols in the floating texts, cause i never did that before. Technically they shouldnt cause a problem though, since they work fine in regular strings. I removed them anyways, and they worked! :eekani: wtf?!?

but then i created a testmap to see if symbols are really the culprit. but then apparently not, cause it works fine in the testmap! :eekani: wtf?!?

go back to my map, put the symbols back in to the original trigger, and now its works! :eekani: wtf again?!?

Yea. Strange.:eek: I Think my computer just went crazy. But whats even more strange is that it hasnt worked for the entire week, and now it does =/:confused:
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
no op limits cuz im doing so few things.
*ahem*

(note: each one of the functions, except CreateTextTag(), that the following function calls also call one or two of their OWN functions).

It still shouldn't get near to hitting the op limit, but each use of that function eats up a ton of op.

JASS:
function CreateTextTagLocBJ takes string s, location loc, real zOffset, real size, real red, real green, real blue, real transparency returns texttag
    set bj_lastCreatedTextTag = CreateTextTag()
    call SetTextTagTextBJ(bj_lastCreatedTextTag, s, size)
    call SetTextTagPosBJ(bj_lastCreatedTextTag, loc, zOffset)
    call SetTextTagColorBJ(bj_lastCreatedTextTag, red, green, blue, transparency)

    return bj_lastCreatedTextTag
endfunction

And I haven't ever had problems with texttags, so I don't think I can say much more =/
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
WC3 has a limate to floating text that can be displayed at once, the longer the message, the fewer can be on the map. After that limate they will only last 0.05 - 0.01 seconds before disapearing and eventually some will disappear instantly. Symbols probably are more complex thus you can have fewer of them but text is moresimple so you can have more of them.

And what is OP???

As far as wc3 goes, an infinate number of functions (or near infinate) may be run at once but they would demand infinate power to run. Such a bug can be seen in "heroes and empires II" where some of the floating text does not appear in the spell select due to the limate to the max number of floating text that can be on map at once, use immage text to overcome that which is basicly an ubersplat that has letters surrounded by alpha as to make only the letters appear.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
OP = Operation

Also, I'm pretty sure the max Floating Texts is 100 or so, so that shouldn't be a problem

As far as wc3 goes, an infinate number of functions (or near infinate) may be run at once but they would demand infinate power to run.
300000 operations without a sleep will cause the thread to crash.

Operations are something along these lines

loop; 2
exitwhen; 3
endloop; 2
read array; 1
write array; 3
write variable; 2
function; 3

(Pipe found this awhile ago and posted it on www.wc3jass.com)

And so on
 
Status
Not open for further replies.
Top