• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

(AGAIN) Problem with floating text

Status
Not open for further replies.

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
I have a problem with f.text where the indexing is going crazy after 100 texts have been made. I have destroyed all the unused floating text, and disable the permanence before it, "i think" to save more place. The question is, is that destroying f.text the best way to save place? Or hiding it is a better way (then we are no allowed to make another text, after the 100th text is made)? question number two is, if we add lifespan age (1s as example), will that text really destroyed after 1 second?

As example I have a trigger like this
  • Event - Every 1 second
  • Action
  • Loop Integer A from 1 to 100
  • do create floating text reads string(Integer A) at point size 7
  • set a[integer A] = last created text
so it will be
a[1] reads 1
a[2] reads 2
a[3] reads 3
...
a[100] reads 100
then we destroy them

but I think it's going different in the next seconds.
it's going to be
a[random from 1-100] reads 1
a[random from 1-100] reads 2
a[random from 1-100] reads 3
...
a[random from 1-100] reads 100

actually what I'm trying to tell is that floating text triggers often work at the wrong place. As example I want to destroy the a[50] but then the destroyed text is a[not 50]. I don't know, I have tried to make the use of floating text as efficient as possible, but still something is going wrong. :( someone got any idea about it?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Not sure I understand fully, can you explain your problem more clearly?

it's important to know there can only be 100 floating texts alive at any given time. If more are created... Idk what happens, I would assume it replaces the last created or maybe it's the oldest. Someone else will have better information on this topic.

You can "pass" the 100limit in that you can make the floating texts in a getlocalplayer block, so you have 50 showing for red, and 100 showing for blue, but technically you have 150 showing.
 
Status
Not open for further replies.
Top