Creating a HUD

Scary Valentine

  • Posts: 11
I'm trying to create a HUD, and I've created a new actor with the attached behavior but it's not showing up on screen. What should I add?

merrak

  • *
  • Posts: 2207
You don't need to anchor the actor to the screen on every frame. Put the 'anchor self to screen' block in an 'on created' event or some other event that triggers once when called.

Pay attention to what coordinate system you're working in. It's easy to get screen space and actor space mixed up. Look at the transform blocks in the drawing palette. If you want (0,0) to refer to the upper left pixel of the screen, throw in a 'switch to screen space' block before anything else in a drawing event attached to an actor.

Scary Valentine

  • Posts: 11
Much appreciated