No matter what I've tried I can't get the alpha field for texttags to change on the fly. This is preventing me from having overhead text fade out like it does by default for gold increase on a bounty kill. I however noticed there are some functions that accept values that I don't understand that may be my solution:
SetTextTagFadepoint( texttag t, real fadepoint) SetTextTagLifespan( texttag t, real lifespan) SetTextTagAge( texttag t, real age)
Could someone explain how these functions work in game. Is it possible to use them to cause the text to fade out while it moves upward? If so could you please post an example of how this is done.
In order to make a texttag fade out, you must set it to be non-permanent (aka. temporary). You do that using SetTextTagPermanent(texttag, boolean). Use SetTextTagLifespan to set the total duration from birth until the texttag is completely gone. SetTextTagFadepoint sets the number of seconds before the fading begins. SetTextTagAge is not necissary to call, but you can use it to set the age of the texttag (in seconds) and jump to a certain stage in its fading process.
For example:
local texttag t=CreateTextTag()
call SetTextTagFadepoint(t, 3)
call SetTextTagLifetime(t, 5)
call SetTextTagPermanent(t, false)
// Set color, position, text etc
The above example creates a text tag that is solid fo 3 seconds, and then fades out over 2 seconds. After fading out, the texttag will automatically be destroyed for you, and its ID will be recycled for use when you create another texttag later.