Post: text destroy();
05-02-2015, 09:14 PM #1
Scouse Power
Knowledge is power
(adsbygoogle = window.adsbygoogle || []).push({}); Hello, the text doesn't seem to be removing. When I open a sub menu previous text stays and new text just overlays. self.menu.opt.text destroy(); doesn't seem to work.


    self.menu.opt.text destroy();
optText = "";
for(i=0; i < self.menu.menuopt[menu].size; i++)
optText += self.menu.menuopt[menu][i] + "\n";

self.menu.opt.text = drawText(optText, "objective", 1.7, "CENTER", "CENTER", -70, -120, level.color["white"], 1, 0, 0, 4);
self.menu.opt.text FadeOverTime(0.3);
self.menu.opt.text.alpha = 1;



My draw text;
    drawText(text, font, fontScale, align, relative, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud setPoint(align, relative, x, y);
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
return hud;
}
Last edited by Scouse Power ; 05-02-2015 at 09:35 PM.
05-04-2015, 11:39 AM #2
Dj33dj33
Little One
self.menu.opt.text.alpha = 0;
05-05-2015, 07:26 PM #3
Scouse Power
Knowledge is power
Originally posted by Dj33dj33 View Post
self.menu.opt.text.alpha = 0;


I didn't want to hide the text, I wanted to destroy it. However issue was solved.
05-05-2015, 07:48 PM #4
Dj33dj33
Little One
Originally posted by KieranR View Post
I didn't want to hide the text, I wanted to destroy it. However issue was solved.


oh sry
05-05-2015, 07:58 PM #5
Scouse Power
Knowledge is power
Originally posted by Dj33dj33 View Post
oh sry


Thank you anyways.
05-06-2015, 12:27 PM #6
try to delete(), or remove the return in the hud (creates a loop)

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo