First off thank you,
I have been pulling my hair out trying to figure out what I am doing wrong. I am trying to change the font in my game (I already have one imported) So I look around and learn I need to use the code
static FontType Game.NormalFont = eFontMyFont;
in the global script.
But if I try to run the game i get the "Variable 'Game' is already defined" error message on this line of code. I cannot find where Game has already been defined. I just started this project so I know that I haven't defined it at least.
Thank you again!
EDIT: Thank you everyone! What I learned I needed to do was to put my code in the game.start function. (also didn't need static FontType)
You just need this bit:
Game.NormalFont = eFontMyFont;
https://adventuregamestudio.github.io/ags-manual/Game.html#gamenormalfont
Hello,
I try to help you
you imported the font
font menu -> right button -> new font?
The line at the top for each entry contains information about the data type, and whether the method/property is static or not.
The actual line looks different, and you can usually find example code near the end of the manual entry (https://www.adventuregamestudio.co.uk/manual/ags53.htm#Game.NormalFont). As is the case here:
QuoteExample:
Game.NormalFont = eFontSpecial;
will change the normal font to the font "Special".
You're supposed to put this inside the
game_start function btw, or you'll still get errors.