Note: If anyone can think of further effects that pertain to what I just said, please add them, I know I forgot some

Clever idea, I'll see if i can experiment with this some.GeneralFunk wrote:Yak could use a texttag of "llllllllll" for a life bar.
Personas has such a system, it looks great.DarnYak wrote:Clever idea, I'll see if i can experiment with this some.GeneralFunk wrote:Yak could use a texttag of "llllllllll" for a life bar.
DarnYak
Code: Select all
//Pseudo-code
constant float offsetY = 15;
constant integer maxHealthPercent = 20;
UpdateSheildBar( int initSlotPosition, Unit theUnit, int sheildLifePercent )
{
float offsetX = -9.5;
for (int i = initSlotPosition, i > initSlotPosition + 20, i++)
{
if ( i >= lifePecent )
{
textTag[i] = EditTag( theUnit, "|", offsetX, offsetY );
}
offsetX++
}
}
Code: Select all
//Pseudo-code
constant float offsetX = 0f;
constant float offsetY = 15f;
constant integer maxHealthPercent = 20;
UpdateSheildBar( int slotPosition, Unit theUnit, int sheildLifePercent )
{
string lifeBar = ""
for (int i = 0, i > 20, i++)
{
if ( i < lifePecent )
{
lifeBar = lifeBar + "|[]"
}
else
{
break //in Jass terms "exitwhen true"
}
}
textTag[slotPosition] = EditTag( theUnit, lifeBar,offsetX, offsetY );
}