FONT problem

Posted By: NL_3DGS_n00b

FONT problem - 07/21/06 21:48

I have a level with 1 block, this level is attached to main.wdl.
main.wdl contains the menu of the game, and in this main.wdl I have included a wdl in a different folder: maps/game.wdl (game.wdl is in a subfolder named: maps).
In main.wdl there is a panel with a newgame menu, and when I press "new game" it links to a function in maps/game.wdl which sets up the new game, and loads a new wmb file.
This WDL file also creates a panel, with a digit on it, in the digit definition in the panel I use the fontname font1.
Font1 exists on main.wdl, cause I use it standardly in the menu, but when I call up the font in the digits definition, I says font1 cannot be found, if I copy the font definition from main.wdl to maps/game.wdl, it gives me the error about double definition for that font when running...

Hoe can I fix this?

EDIT:

This is the structure:

Code:
main.wdl <- main WDL file with the menu

font hsfont = <font.tga>, 13, 20;



Code:
maps/game.wdl <- ingame stuff (game.wdl is in a subfolder named: maps)

panel pan_timerback{
digits = 0,0,2,hsfont,1,time_hour;
digits = 20,0,2,hsfont,1,time_minute;
}


Posted By: Claus_N

Re: FONT problem - 07/21/06 21:59

maybe you have defined the font in main.wdl after including game.wdl?
Posted By: Anonymous

Re: FONT problem - 07/21/06 22:08

Hi!

Probably the definition of your font (font hsfont = <font.tga>, 13, 20;( is right after the inlude-statement (of your maps/game.wdl).
Also use the path-statemen to access files in subdir maps.
Place the font-definition before the include-statement and it will work:

Code:

path "maps";
font hsfont = <font.tga>, 13, 20;
include <game.wdl>;




mercuryus

EDIT: ups! too late
Posted By: NL_3DGS_n00b

Re: FONT problem - 07/21/06 22:27

Thanks both of you, I just put the include behind the definition of the font, and now it works. Was very logical, but I am thinking not clearly today, i'm happy I can count on the members here ^^.
© 2023 lite-C Forums