Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help I need some explanations....
#1
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        hud = createFontString("default",1);
        self addHUDToList(hud);
        self thread hudListDeath();
    }
}

addHUDToList(hud)
{
    if(!defined(self.gameHudeList)) self.gameHudeList = [];
    self.gameHudeList[ self.gameHudeList.size] = hud;
}
hudListDeath()
{
    self endon("disconnect");
    self thread hudListDisconnect();
    self waittill("death");
    for(i=0; i < self.gameHudeList.size; i++)
    {
        self.gameHudeList[i] destroy();
    }
    self.gameHudeList = undefined;
]
hudListDisconnect()
{
    self endon("death");
    self waittill("disconnect");
    for(i=0; i < self.gameHudeList.size; i++)
    {
        self.gameHudeList[i] destroy();
    }
    self.gameHudeList = undefined;
]

[Image: WTFisThisShit.png?1324143544]
Reply

#2
That looks like the code relating to drawing the hud on start of game and after each death to me.
[Image: 6vFJ9.png]


All i have to say is.....

lol


Reply

#3
really wtf, why spawn array of them Undecided
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#4
Whats the problem? The code looks good, is a good way of destroying texts.
Reply

#5
The code is fine, there is nothing wron with it, that code is easy to work with, add a few new line underneath drawHUD and you can add your very own cuztomised crosshair. Smile
[Image: 6vFJ9.png]


All i have to say is.....

lol


Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.