How do I Make an Object stick to layout

Just started using Construct 2? Post your questions here

Post » Thu Jan 15, 2015 5:25 pm

Hello,

This is a dumb question but i'm a dumb person so...
I'm trying to create a HUD for a platform game. I want to stick my Health Bar to the corner of the layout.
How do I do this? I can create the object in the corner, but i dont know how to make him follow my main character.
Thanks.
B
3
Posts: 8
Reputation: 191

Post » Thu Jan 15, 2015 6:00 pm

In the layer tab at the right, add a new layer and call it "HUD". Whenever you select your "HUD" layer, you'll see it's properties on the right. There will be a parallex option for both X and Y, just change the values from 100 to 0 (and you'll probably want to do the same for Scale Rate). Finally, right click your health bar and move to layer "HUD".

But, if you're making this sort of thing, you should take a look at this:
https://www.scirra.com/tutorials/594/bu ... erface-ui/

This provides a method of making a HUD that you can apply to multiple Layouts, so if you're making an RPG game you will be able create on layout for HUD that you can quickly and easily apply to every level in your RPG game.
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679

Post » Fri Jan 16, 2015 10:36 am

It worked :D thank you.
B
3
Posts: 8
Reputation: 191

Post » Sun Jan 18, 2015 10:52 pm

Ravers wrote:It worked :D thank you.


Sure thing :)
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests