EvoloZz
17th November 2012, 12:31
I wanted to make a HUD that would show some text on the bottom of the screen, but I dont seem to get it working
Here's where i precached it:
game["hud_text"] = &"RAndom TeXt";
precacheString(game["hud_text"]);
Under spawnPlayer() I have:
ShowText()
{
self endon("disconnect");
self endon("joined_spectators");
if(!isDefined(self.text_right))
{
self.text_right = newClientHudElem(self);
self.text_right.x = 249;
self.text_right.y = 471;
self.text_right.alignX = "left";
self.text_right.alignY = "middle";
self.text_right.sort = 1;
self.text_right.alpha = 1;
self.text_right.fontScale = 1.2;
self.text_right.archived = true;
self.text_right setText(game["hud_text"]);
}
}
Tell me if something is wrong, again I say that I am newb :D
~EvoloZz
Here's where i precached it:
game["hud_text"] = &"RAndom TeXt";
precacheString(game["hud_text"]);
Under spawnPlayer() I have:
ShowText()
{
self endon("disconnect");
self endon("joined_spectators");
if(!isDefined(self.text_right))
{
self.text_right = newClientHudElem(self);
self.text_right.x = 249;
self.text_right.y = 471;
self.text_right.alignX = "left";
self.text_right.alignY = "middle";
self.text_right.sort = 1;
self.text_right.alpha = 1;
self.text_right.fontScale = 1.2;
self.text_right.archived = true;
self.text_right setText(game["hud_text"]);
}
}
Tell me if something is wrong, again I say that I am newb :D
~EvoloZz