Layer/HUD issue

For questions about using Classic.

Post » Fri Apr 16, 2010 7:39 pm

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?
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Apr 16, 2010 7:46 pm

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.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Apr 16, 2010 7:50 pm

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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Apr 16, 2010 7:58 pm

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.
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Apr 16, 2010 8:08 pm

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

[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.[/quote:21y9omml]
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Apr 16, 2010 8:24 pm

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.
B
1
G
2
Posts: 4
Reputation: 633

Post » Fri Apr 16, 2010 8:28 pm

[quote="SpectreSurplice":34rzswoj]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.[/quote:34rzswoj]

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:



Then it should appear. Which version of Construct are you using presently?
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Apr 16, 2010 8:32 pm

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. :oops:
B
1
G
2
Posts: 4
Reputation: 633


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests