ItsMods

Full Version: Health Icon (By Yamato)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This was made by @Yamato , he just asked me to post it here since he couldn't access his account right now. [Image: OneManArmy.png]


[Image: db880e2e.png]

OMA

"A icon that appears in HUD to "count" your health, is different to a health bar"

OMA

Precache the shader in init first:

Code:
precacheshader("hint_health");

Code:
HealthIcon()
{
    self endon("death");
    self endon("disconnect");
    if(!isDefined(self.healthicon))
    {
              self.healthicon = createIcon("hint_health",50,50);
              self.healthicon setPoint("","",280,-190);
    }
    self thread KillHudElem(self.healthicon);
    self thread MakeBigger();
    while(1)
    {
        if(self.health > self.maxhealth)
            self.healthicon.color = (1,1,1);    
        if(self.health > 75)
            self.healthicon.color = (0.635,0.929,0.604);        
        if(self.health <= 75)
            self.healthicon.color =  (1,1,0.202);
        if(self.health < 45)
            self.healthicon.color = (1,0.651,0.23);    
        if(self.health > 20)
        {
            if(self.healthicon.width != 50)
                self.healthicon.width = 50;
            if(self.healthicon.height != 50)
                self.healthicon.height = 50;
        }
        if(self.health < 20)
            self.healthicon.color = (1,0.2,0.2);
    wait 0.1;
    }
}

MakeBigger()
{
    self endon("death");
    self endon("disconnect");
    while(self.health < 20)
    {
        self.healthicon scaleOverTime(0.7,60,60);
        wait 0.7;
        self.healthicon scaleOverTime(0.7,50,50);
        wait 0.7;
    }
}

KillHudElem(elem)
{
    self waittill_any("disconnect","death","spawned_player");    
    if(isdefined(elem))
        elem destroy();
}

OMA

Yamato's :OMA: tastic screenshot:

[Image: 54FC91F106E0C92F5E5AB03020419E864636C8C8]
oh noes OMA stole @Yamato password
its seems epic, maybe some videos/images ?
EDIT: image not loads for me Sad
OMA
Camalen
what about a Complete new MW2 just 4 You Yamato Angel
Modern One Man Army 2

BTW here some Sounds matching

New mod idea: The One Man Army, Cool
(10-16-2011, 21:08)Yamato Wrote: [ -> ]New mod idea: The One Man Army, Cool

Yapp unlimited ideas for little artists like us Tongue

've heard the track and immediately knew the person to which title fits

new Ideas of you now wears my Copyright *JoKe*
(10-16-2011, 19:22)BloKK187 Wrote: [ -> ]what about a Complete new MW2 just 4 You Yamato Angel
Modern One Man Army 2

BTW here some Sounds matching

song sucks balls, wait what .. song? its more like randomly talking shit
Oly Moly, this is a good idea, health icon for a group of 5 people is exactly what I need
Pages: 1 2 3