HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

FloatText[array] All Get Destroyed In a Loop When Ordered to Destroy Specific Ranges?

11-10-2008, 07:14 PM#1
Brash
This is odd.

Each time a certain spell was cast I created F-text above a units head and gave it the normal fadetime/lifespans etc. and then i assigned it to a variable like so:
Trigger:
Set IntegerVar = IntegerVar + 1
Set FtextVar[IntegerVar] = (Last created floating text)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
IntegerVar Equal to 10
Collapse Then - Actions
Collapse For each (Integer A) from 11 to 20, do (Actions)
Collapse Loop - Actions
Destroy FtextVar[Integer A]
Collapse Else - Actions
Do Nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
IntegerVar Equal to 20
Collapse Then - Actions
Collapse For each (Integer A) from 1 to 10, do (Actions)
Collapse Loop - Actions
Destroy FtextVar[Integer A]
Set IntegerVar = 1
Collapse Else - Actions
Do Nothing

So if it hits 10 it will clear all of the ftexts created between 11 to 20, making them all cleared out for the next cycle when the unit casts the spell again. And when it reaches 20 it should clear all the ftexts between 1 to 10 ahead of time and then resets the integervar back to 1 to start the cycle back over again.. this should destroy only a section of the ftexts by the time you are on the next group of 10 ftexts the others should be fully faded and safe to destroy, right?

Well it doesn't!!

For some odd reason it is sometimes clearing the last ftexts created (The very one created currently in the running of this trigger event instance on the 10th and 20th integer set).. and sometimes it clears all ftexts currently assigned to this variable as though I did a Loop from 1 - 20.

How can it be sometimes clearing 1 through 20 every time it hits the 10th and 20th. On top of that, on the 10th and 20th cast It will often instantly clear and never display the ftext for that instance but will display the inbetween texts.

This makes no sense! It's such a simple setup and the computer doesn't listen to what i tell it to do.
11-10-2008, 07:26 PM#2
Zerzax
I'm a little confused about the problem, but I do know that your DoNothing actions are completely extraneous, you can just remove them. I have no idea why blizzard made it, its just an empty function call....
11-10-2008, 07:27 PM#3
Naakaloh
What is the event for this trigger?
11-10-2008, 07:48 PM#4
Brash
Quote:
Originally Posted by Naakaloh
What is the event for this trigger?

just a unit starts the effect of an ability

and then i specify the unit type of casting unit and the ability in the condition
11-11-2008, 11:50 AM#5
Anitarf
If you give your floating texts a lifespan and disable their permanence then you don't need to destroy them anyway.
11-11-2008, 01:54 PM#6
Brash
Quote:
Originally Posted by Anitarf
If you give your floating texts a lifespan and disable their permanence then you don't need to destroy them anyway.

hm. okay. that solves that then. lol. but still, it's rather odd why it does this. that has got to be a bug. it's as though ftext isn't suited fully for variables with arrays