Log in

View Full Version : hud problem



feritkkan
11th July 2016, 10:27
hi all
i added activators and runners text but i have a problem how i can add axis and allies left to near this text
and how i can move this time to bottom
here ss;
1129


main()
{

thread ER_HUD();
}

ER_HUD()
{

level.ER_HUD1 = newHudElem();
level.ER_HUD1.alignx = "left";
level.ER_HUD1.x = 20;
level.ER_HUD1.y = 450;
level.ER_HUD1.color = (0, 1, 0);
level.ER_HUD1.fontscale = 1.3;
level.ER_HUD1.font = "default";
level.ER_HUD1 setText(&"");

level.ER_HUD2 = newHudElem();
level.ER_HUD2.alignx = "left";
level.ER_HUD2.x = 20;
level.ER_HUD2.y = 430;
level.ER_HUD2.color = (1, 0, 0);
level.ER_HUD2.fontscale = 1.3;
level.ER_HUD2.font = "default";
level.ER_HUD2 setText(&"");

level.ER_HUD3 = newHudElem();
level.ER_HUD3.alignx = "right";
level.ER_HUD3.x = 20;
level.ER_HUD3.y = 70;
level.ER_HUD3.color = (1, 0, 0);
level.ER_HUD3.fontscale = 1.0;
level.ER_HUD3 setText(&"");

level.ER_HUD4 = newHudElem();
level.ER_HUD4.alignx = "right";
level.ER_HUD4.x = 322;
level.ER_HUD4.y = 232;
level.ER_HUD4.color = (1, 0, 0);
level.ER_HUD4.fontscale = 1.0;
level.ER_HUD4 setText(&".");

level.ER_HUD5 = newHudElem();
level.ER_HUD5.alignx = "right";
level.ER_HUD5.x = 20;
level.ER_HUD5.y = 90;
level.ER_HUD5.color = (1, 0, 0);
level.ER_HUD5.fontscale = 1.0;
level.ER_HUD5 setText(&"");

level.ER_HUD6 = newHudElem();
level.ER_HUD6.alignx = "right";
level.ER_HUD6.x = 49;
level.ER_HUD6.y = 100;
level.ER_HUD6.color = (1, 0, 0);
level.ER_HUD6.fontscale = 1.0;
level.ER_HUD6 setText(&"");

level.ER_HUD7 = newHudElem();
level.ER_HUD7.alignx = "left";
level.ER_HUD7.x = 20;
level.ER_HUD7.y = 30;
level.ER_HUD7.color = (1, 0, 0);
level.ER_HUD7.fontscale = 1.3;
level.ER_HUD7 setText(&"^7ACTIVATORS^9 :");

level.ER_HUD7 = newHudElem();
level.ER_HUD7.alignx = "left";
level.ER_HUD7.x = 20;
level.ER_HUD7.y = 10;
level.ER_HUD7.color = (1, 0, 0);
level.ER_HUD7.fontscale = 1.3;
level.ER_HUD7 setText(&"^7RUNNERS^9 :");
}

:confused: :confused: :confused:

Ni3ls
11th July 2016, 11:12
how i can add axis and allies left to near this text
You mean you want to display the number of activators and runners?


how i can move this time to bottom



startGame()
{
level.starttime = getTime();

if(level.timelimit > 0)
{
level.clock = newHudElem();
level.clock.horzAlign = "left";
level.clock.vertAlign = "top";
level.clock.x = 8;
level.clock.y = 2;
level.clock.font = "default";
level.clock.fontscale = 2;
level.clock setTimer(level.timelimit * 60);
}

for(;;)
{
checkTimeLimit();
wait 1;
}
}

Default HUD of the timer in gametype.gsc

feritkkan
11th July 2016, 12:20
yeah i mean this

serthy
11th July 2016, 12:42
You should use .label attribute of the hud in combination with the &&1 placeholder:


level.ER_HUD7.label = &"^7ACTIVATORS^9 : &&1";
level.ER_HUD7 setValue( your_count );

btw, isn't xfire dead? ;)

feritkkan
11th July 2016, 21:20
You should use .label attribute of the hud in combination with the &&1 placeholder:


level.ER_HUD7.label = &"^7ACTIVATORS^9 : &&1";
level.ER_HUD7 setValue( your_count );

btw, isn't xfire dead? ;)

thats not working

IzNoGoD
12th July 2016, 00:20
Am about to close the topic due to insufficient info from the op.

"that doesnt work"