This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Text tags seem not to be destroyed after their duration time expires.
Do I have to manually destroy them? If so, I would have to use the following triggers to safely create and remove them:
void gf_UnitTextTag (unit lp_u, text lp_t, color lp_c, int lp_s, playergroup lp_g) { // Variable Declarations int lv_a; // Variable Initialization lv_a = c_textTagNone; // Implementation TextTagCreate(TextWithColor(lp_t, lp_c), lp_s, UnitGetPosition(lp_u), 0.8, true, false, lp_g); lv_a = TextTagLastCreated(); if((UnitIsAlive(lp_u) == true)) { TextTagAttachToUnit(lv_a, lp_u, 1.0); } TextTagSetVelocity(lv_a, 0.4, 90.0); TextTagSetTime(lv_a, c_textTagTimeDuration, 5.0); TriggerExecute(gt_UnitTextTagSub, false, false); } bool gt_UnitTextTagSub_Func (bool testConds, bool runActions) { // Variable Declarations int lv_u; // Variable Initialization lv_u = c_textTagNone; // Actions if (!runActions) { return true; } lv_u = gv_unitTextTag; gv_unitTextTag = c_textTagNone; Wait(5.0, c_timeGame); TextTagDestroy(gv_unitTextTag); return true; }
But this would add a 5 seconds wait timer for all the text tags I create in my map. I create text tags for every killed unit in my map. Is there some more efficient way of removing expired text tags?
as documentation says. If there is 'Destroy' function it means you should use it :)
I always create action with create thread, text tag parameter and wait for x delay, destroy here:
Destroy Text tag delay Options: Action, Create Thread Return Type: (None) Parameters text tag = No Text Tag <Text Tag> delay = 0.0 <Real> Grammar Text: Destroy Text tag delay(text tag, delay) Hint Text: (None) Custom Script Code Local Variables Actions General - Wait delay Real Time seconds Text Tag - Destroy text tag
Maybe this was causing some lag in my map. Thx for your answer.
Text tags seem not to be destroyed after their duration time expires.
Do I have to manually destroy them? If so, I would have to use the following triggers to safely create and remove them:
But this would add a 5 seconds wait timer for all the text tags I create in my map. I create text tags for every killed unit in my map. Is there some more efficient way of removing expired text tags?
as documentation says. If there is 'Destroy' function it means you should use it :)
I always create action with create thread, text tag parameter and wait for x delay, destroy
here:
Maybe this was causing some lag in my map. Thx for your answer.