H.U.D graphic

GeorgeH

  • Posts: 3
Hello to everybody.This is my first post so excuse my ignorance about ehh..almost everything.One (he,he,he...)quick question.I am using a premade H.U.D. (png)on the top of a side-scrolling  shooter ,where i draw the score and the  lives of the game.How can i make it stay always on top of the screen and not left behind when the screen scrolls?Is there a function that locks that H.U.D background to position?Do i have to use background layers and if so how can i do that?
Thank you in advance. :)

Luyren

  • *
  • Posts: 2510
There's a block that reads "anchor [actor] to screen", use that. Use the search bar to look for that in the palette, or go to actors > drawing and should be there.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

GeorgeH

  • Posts: 3
Thank you for the reply.You mean that i should import that H.U.D image as an Actor and not as a background( the size is 480x32 px)?

Luyren

  • *
  • Posts: 2510
It's common practice to have your HUD as actors instead of a background. If you do want it to be a literal background, set it to not repeat and make sure it is the same size of the screen. If you later change your game's resolution, you'll have to change the size of your background HUD as well, and that's one reason actor are better for this.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

GeorgeH

  • Posts: 3
Will try.Thanks alot... :) :) :)

Chris24XD

  • Posts: 48
How can i make it stay always on top of the screen and not left behind when the screen scrolls?
Just wanna add that if you make a score by a attribute the recommended thing you can do is to use the "draw text" block which it also works as a HUD Keep in mind that if you add the "draw text" block inside an Actor's behavior it will follow the Actor so be careful when you put this block...