Let's say you wanted to display a fullscreen HUD that displayed without a statusbar.
We'll look at constructing an example that displays score at the top-right of the screen, with health and ammo displayed at the bottom-right.
First, we'll define the location of the HUD area. To do this, we'll create an origin element.
origin 1 // Our new HUD location
{
x = 320;
y = 0;
}
We have told the game to consider the HUD to be located further right, but at the very top of the screen.
Now, we'll define the child element for the score. We do not need to add a child pic element at the top like previous, since we are drawing the HUD elements directly on the player screen instead of having a statusbar.
origin 1
{
x = 316;
y = 0;
child origin // The score display
{
x = 0;
y = 4;
child digits
{
value_source = "SCORE";
digits = 6;
}
}
}
We will display the score at the basic x co-ordinates, and add 4 to the y co-ordinate so there's a little bit of space between the top of the game screen and the score.
Next, we want to display the values for health and ammo just as far right, but down towards the bottom of the screen instead.
We will also modify the x co-ordinate to account for the size difference between the score (displaying 6 digits) and the health/ammo (displaying 3 digits each). The original Wolf3D number images are 8 pixels wide and there is a different of 3 digits, so we'll move these values 24 pixels across.
origin 1
{
x = 316;
y = 0;
child origin // The score display
{
x = 0;
y = 0;
child digits
{
value_source = "SCORE";
digits = 6;
}
}
child origin // The health display
{
x = 24;
y = 164;
child digits
{
value_source = "HEALTH";
digits = 3;
}
}
child origin // The ammo display
{
x = 24;
y = 180;
child digits
{
value_source = "AMMO_PRIMARY";
digits = 3;
}
}
}
This display is designed for a game being played at the maximum in-game screen size, so we'll need to add one more thing for that to look correct (as correct as it will look with current art assets, anyway).
Right at the bottom of the file, underneath the last closed bracket, you'll want to add the following line:
show_without_key = true;
By default, when LZWolf is played with the maximum display, the statusbar or HUD displays when the player holds down the TAB key. The show_without_key variable simply tells the game whether or not that should be ignored. By setting it to a value of true, the HUD will always display when playing the game.
With all of this put together, when you test your pk3, you should see something akin to the following (At maximum Screen Size)