Layer/HUD issue

This forum is currently in read-only mode.
From the Asset Store
Use this epic life system with hearts like famous games in your game!
  • I've already checked the documentation and HUD tutorials, but they don't seem to cover an issue I'm having.

    I have the newest version of Construct, and am trying to make a HUD for my game. This seems pretty straightforward, there are many many tutorials on the subject that all say basically the same thing. So I go to the Layout Editor, I select the layers tab, and I add a new layer to the top of the current layout.

    I change the name of this layer, and then I set the Scroll X Rate and Scroll Y Rate to 0. I don't touch any other settings for the layer. Then, while I still have the HUD layer selected, I insert a text object and change it to some text. I position it within the layout, and fire up the preview.

    ...and there's no text on screen. It's right there in layout view, but as soon as I play the actual game it's gone.

    Nothing I seem to do can make text on the top layer appear. I've made sure the background image is sent to the back and the text is sent to the front, I've made sure the opacity of the layer and the text is set to 100%, I've made sure the layer is set to transparent (you know, the setting that's supposed to make everything but the text invisible), I've made sure the layer is visible and unlocked...nothing. The only way I can make text appear on the screen is by moving it from the HUD layer on top to the layer with my background/sprites etc.

    Has anyone else run into this? Is it a glitch of some kind? Or is there some setting I haven't tweaked?

  • where on the layer is this text object exactly, and how big is your window, trying putting the text object at x=320 and y=240.

  • When asking for help it usually helps if you post a .cap.

    Anyways,

    Try setting your text object's position to (32,32). An object on a layer without scrolling needs to be positioned with taking into account (0,0) as the top left corner of the window. It will stay in whatever relative position to (0,0) it is placed.

  • Ah, my apologies. Here's the .cap: http://www.mediafire.com/?zjnmm0nqzzq

    Anyway, right now, just for testing purposes, I set the text to appear at (213,1397), which is right above my player object at (245,1439). The player object appears just fine, and if I move the text back to the object layer it appears right where it's supposed to, so I don't think that's it.

  • Quazi and Davio basically already provided the solution to your problem. Also you might want have a look here: http://www.scirra.com/forum/viewtopic.php?f=3&t=4916

    [quote:21y9omml]

    To be clear: when you start out in the layout editor, there's one outlined rectangle which represents your game's window/resolution. So place all the stuff on a Scroll Rate 0% layer inside this rectangle in order for it to appear on the screen. It doesn't matter that your game is actually starting all the way down in the layout.

  • That was actually one of the things I looked at already. I've checked, and my text is within the rectangle in the layout view. It's still not showing up.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That was actually one of the things I looked at already. I've checked, and my text is within the rectangle in the layout view. It's still not showing up.

    Well in the cap you provided the text is sitting somewhere near the sprite. You said you did already put it up there? Up there like that:

    <img src="http://dl.dropbox.com/u/2306601/textup.png">

    Then it should appear. Which version of Construct are you using presently?

  • Oh, that's why it wasn't appearing. I thought it had to start on the same screen as the player to appear. When I moved it to the top-left corner like in the screenshot, it worked.

    I guess I hadn't quite figured out that the two layers display differently than they appear to.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)