Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[GM8] Sprite Fonts Are Invisible


StealthyMC

Recommended Posts

The fangame I'm working on is called Sonic: Edge Of Darkness and I've been having issues using sprite fonts in Game Maker 8.

The game uses sprite fonts frequently, from startup screens to HUD. The problem here is that when I use sprite fonts in the first room, but when it transitions to the next room it will use sprite fonts but the text never draws. This also happens to the HUD too:

[screenshot100a.png

The function [font_add_sprite(sprFontNormal, ord("0"), true, 0);] is used in the startup room's creation code.

Any help please? :squestion:

Link to comment
Share on other sites

You say it's in the start-up code. Is it possible that the next room's graphics are being drawn over it, so you can't see it? Try commenting out the code for drawing the next level's background and see if it appears.

No before when I first used the engine (Sonic DASH) the sprite numbers were working fine. But when I created the menu room and used the sprite fonts, I went to the level and the numbers are gone.

Link to comment
Share on other sites

I'm having a little trouble understanding you, sorry! What I do know however is the font is set in the global controller's draw event so why do you need to set it again if you are using sprFontNormal. Also keep in in mind that there is no lower case to the front so when you write like this:

draw_text(view_xview[global.View]+view_wview[global.View]-8, view_yview[global.View]+8, "WTF ARE YOU DOING?");

you need to MAKE SURE YOU TYPE IN CAPS. I hope that helps...

Link to comment
Share on other sites

I'm having a little trouble understanding you, sorry! What I do know however is the font is set in the global controller's draw event so why do you need to set it again if you are using sprFontNormal. Also keep in in mind that there is no lower case to the front so when you write like this:

draw_text(view_xview[global.View]+view_wview[global.View]-8, view_yview[global.View]+8, "WTF ARE YOU DOING?");

you need to MAKE SURE YOU TYPE IN CAPS. I hope that helps...

They're already in all caps...

Also, let me rephrase that for you. I define the sprite font variable in the first room of the game. Now I put the font to the sprite font in the object's draw event with this:

draw_set_font(global.FontNormal)

The numbers in the HUD used to be there when I used the sprite font only once. When I put the sprite font on another object, all the text is invisible.

Hope that makes sense. Sorry if you don't.

Link to comment
Share on other sites

I cannot recreate the problem so you must be doing something wrong beyond what you've given us here. That or all these code typos in your posts are also in your game.

Well the last thing I could do is to let some one download the example. Am I allowed to do this? And about the typo the forums doing that on purpose. It's trying to make two words for some reason.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...